-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate_bundles.sh
executable file
·30 lines (26 loc) · 1.04 KB
/
update_bundles.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
#!/bin/bash
vim_bundle_git=(
"git://github.com/tomtom/tlib_vim.git"
"git://github.com/MarcWeber/vim-addon-mw-utils.git"
"git://github.com/garbas/vim-snipmate.git"
"git://github.com/honza/vim-snippets.git"
"git://github.com/scrooloose/nerdtree.git"
"git://github.com/scrooloose/syntastic.git"
"http://github.com/tpope/vim-surround"
"http://github.com/kien/ctrlp.vim.git"
"git://github.com/jlanzarotta/bufexplorer.git"
"https://github.com/bling/vim-airline"
"git://github.com/tpope/vim-fugitive.git"
)
bundles_dir=./bundle
echo "Cleaning up $bundles_dir"
rm -rf $bundles_dir/*
for bundle in ${vim_bundle_git[*]}
do
IFS='/' read -ra bundle_url <<< "$bundle"
bundle_name=`echo "${bundle_url[${#bundle_url[@]}-1]}" | sed -e 's/.git$//'`
echo "Creating directory for $bundle_name"
mkdir $bundles_dir/$bundle_name
git clone $bundle $bundles_dir/$bundle_name
find $bundles_dir/$bundle_name -name ".git" -exec rm -rf {} \;
done