scripts/scripts/update_vim_plugins.sh

50 lines
797 B
Bash
Executable File

#!/usr/bin/fish
function pull_plugins
for plugin in ./*
cd $plugin
git stash
git pull -f
set res $status
if test $res != 0; and test $res != 128
echo "error $res in $PWD"
exit 1
end
if test "$plugin" = ./base16-vim
echo "fixing attrs for $plugin"
sed -i '/Base16hi/! s/a:\(attr\|guisp\)/l:\1/g' colors/*.vim
end
if test -d doc
echo "generating tags for $PWD"
vim --cmd "helptags doc/" --cmd "q"
end
cd ..
end
end
function cd_and_pull
cd $argv[1]
pull_plugins
cd ..
end
cd ~/.vim/pack
for folder in ./*
cd $folder
test -d start; and cd_and_pull start
test -d opt; and test $1 = opt; and cd_and_pull opt
cd ..
end
## EOF