scripts/scripts/cmds/update-vim-plugins.fish

46 lines
554 B
Fish
Executable File

#!/usr/bin/env fish
function pull_plugins
for plugin in ./*
cd $plugin
echo "Updating $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 -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 cd_and_pull opt
cd ..
end
## EOF