-
Notifications
You must be signed in to change notification settings - Fork 0
/
vootstrap.sh
33 lines (32 loc) · 1.01 KB
/
vootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
name="$1"
if [[ $name =~ ^unite-.* ]]; then
ptype='unite'
else
ptype='general-purpose'
fi
echo "${name} (${ptype})"
case "${name}" in
unite*)
bare_name=$(echo "${name}" | sed -e 's/^unite-//')
echo 'mkdir -p "./autoload/unite/sources/"'
mkdir -p "./autoload/unite/sources/"
echo "...making initial './autoload/unite/sources/${bare_name}.vim'"
echo 'hi' > "./autoload/unite/sources/${bare_name}.vim"
echo 'mkdir -p "./doc/"'
mkdir -p "./doc/"
echo "...making initial './doc/${name}.txt'"
echo 'hihi' > "./doc/${name}.txt"
;;
*)
bare_name=$(echo "${name}" | sed -e 's/\.vim$//' | sed -e 's/-/_/')
echo 'mkdir -p "./autoload/unite/sources/"'
mkdir -p "./autoload/unite/sources/"
echo "...making initial './autoload/unite/sources/${bare_name}.vim'"
echo 'hi' > "./autoload/unite/sources/${bare_name}.vim"
echo 'mkdir -p "./doc/"'
mkdir -p "./doc/"
echo "...making initial './doc/${name}.txt'"
echo 'hihi' > "./doc/${name}.txt"
;;
esac