91 lines
1.7 KiB
Bash
Executable File
91 lines
1.7 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -E
|
|
|
|
DIRS="
|
|
syntax indent ftplugin ftdetect autoload compiler
|
|
after/syntax after/indent after/ftplugin after/ftdetect
|
|
"
|
|
|
|
copy_dir() {
|
|
if [ -d "$1/$2" ]; then
|
|
for file in $(find "$1/$2" -name '*.vim'); do
|
|
file_path="$(dirname "${file##$1/}")"
|
|
mkdir -p "$file_path"
|
|
cp $file $file_path/
|
|
done
|
|
fi
|
|
}
|
|
|
|
# Fetches syntax files from given Github repo
|
|
|
|
download() {
|
|
for pack in $1; do
|
|
dir="tmp/$(echo "$pack" | cut -d '/' -f 2)"
|
|
echo "- [$pack](https://github.com/$pack)"
|
|
rm -rf "$dir"
|
|
git clone -q --recursive "https://github.com/$pack.git" "$dir" &
|
|
done
|
|
|
|
wait
|
|
}
|
|
|
|
extract() {
|
|
for pack in $1; do
|
|
dir="tmp/$(echo "$pack" | cut -d '/' -f 2)"
|
|
# which tree > /dev/null && tree tmp
|
|
for subdir in $DIRS; do
|
|
copy_dir "$dir" "$subdir"
|
|
done
|
|
done
|
|
}
|
|
|
|
rm -rf tmp
|
|
rm -rf $DIRS
|
|
mkdir -p tmp
|
|
|
|
PACKS="
|
|
vim-ruby/vim-ruby
|
|
kchmck/vim-coffee-script
|
|
tpope/vim-haml
|
|
tpope/vim-bundler
|
|
pangloss/vim-javascript
|
|
leshill/vim-json
|
|
mutewinter/tomdoc.vim
|
|
mutewinter/nginx.vim
|
|
timcharper/textile.vim
|
|
tpope/vim-markdown
|
|
nono/vim-handlebars
|
|
acustodioo/vim-tmux
|
|
groenewege/vim-less
|
|
wavded/vim-stylus
|
|
tpope/vim-cucumber
|
|
jrk/vim-ocaml
|
|
slim-template/vim-slim
|
|
vim-scripts/XSLT-syntax
|
|
vim-scripts/python.vim--Vasiliev
|
|
vim-scripts/octave.vim--
|
|
jnwhiteh/vim-golang
|
|
spf13/PIV
|
|
briancollins/vim-jst
|
|
derekwyatt/vim-scala
|
|
derekwyatt/vim-sbt
|
|
travitch/hasksyn
|
|
ajf/puppet-vim
|
|
beyondwords/vim-twig
|
|
sudar/vim-arduino-syntax
|
|
guns/vim-clojure-static
|
|
chrisbra/csv.vim
|
|
elixir-lang/vim-elixir
|
|
jimenezrick/vimerl
|
|
tpope/vim-git
|
|
skwp/vim-rspec
|
|
vim-scripts/vbnet.vim
|
|
jcf/vim-latex
|
|
"
|
|
|
|
download "$PACKS"
|
|
extract "$PACKS"
|
|
|
|
rm -rf tmp
|