-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathinstall.sh
69 lines (60 loc) · 1.69 KB
/
install.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env bash
default_bundles=(
ack.vim
actionscript.vim
applescript.vim
browser-refresh.vim
cocoa.vim
gist-vim
jade.vim
json.vim
markdown-preview.vim
nerdcommenter
nerdtree
processing.vim
rvm.vim
snipmate.vim
statusline
syntastic
taglist.vim
vim-cucumber
vim-fugitive
vim-haml
vim-javascript
vim-markdown
vim-rails
vim-ruby
vim-supertab
vim-unimpaired
yankring
)
full_path=`pwd`
echo "Creating directories..."
mkdir -p $full_path/home/.vim/bundle
mkdir -p $full_path/home/.vim/snippets
mkdir -p $full_path/home/.vim/tmp/swap
mkdir -p $full_path/home/.vim/tmp/yankring
mkdir -p $full_path/home/.vim/spell
echo "Setting up default vimrc.local..."
cp $full_path/templates/.vimrc.local.example $full_path/home/.vimrc.local
echo "Initializing submodules..."
git submodule init
git submodule update
git submodule foreach git checkout master
git submodule foreach git clean -f
echo "Symlinking default bundles..."
for i in "${default_bundles[@]}"; do
ln -sv $full_path/home/.vim/bundle_storage/$i $full_path/home/.vim/bundle/$i
done
echo "Symlinking default snippets..."
for f in `ls $full_path/home/.vim/snippets_storage/`; do
ln -sv $full_path/home/.vim/snippets_storage/$f $full_path/home/.vim/snippets/$f
done
# Make an additional symlink of css for scss
ln -sv $full_path/home/.vim/snippets_storage/css.snippets $full_path/home/.vim/snippets/scss.snippets
echo "--------------------------------------------------"
echo "*** Install Complete ***"
echo "--------------------------------------------------"
echo "Run the following command to symlink your castle:"
echo "homesick symlink ${PWD##*/}"
echo "--------------------------------------------------"