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

46 lines
554 B
Fish
Raw Normal View History

#!/usr/bin/env fish
2019-05-29 23:17:00 -07:00
function pull_plugins
2019-07-05 19:09:01 -07:00
for plugin in ./*
cd $plugin
2019-05-29 23:17:00 -07:00
2019-07-05 19:09:01 -07:00
echo "Updating $plugin"
2019-07-05 19:09:01 -07:00
git stash
git pull -f
2019-05-29 23:17:00 -07:00
2019-07-05 19:09:01 -07:00
set res $status
2019-07-05 19:09:01 -07:00
if test $res != 0; and test $res != 128
echo "error $res in $PWD"
exit 1
end
2019-05-29 23:17:00 -07:00
2019-07-05 19:09:01 -07:00
if test -d doc
echo "generating tags for $PWD"
vim --cmd "helptags doc/" --cmd "q"
end
2019-05-29 23:17:00 -07:00
2019-07-05 19:09:01 -07:00
cd ..
end
end
function cd_and_pull
2019-07-05 19:09:01 -07:00
cd $argv[1]
pull_plugins
cd ..
end
2019-05-29 23:17:00 -07:00
cd ~/.vim/pack
for folder in ./*
2019-07-05 19:09:01 -07:00
cd $folder
2019-05-29 23:17:00 -07:00
2019-07-05 19:09:01 -07:00
test -d start; and cd_and_pull start
test -d opt; and cd_and_pull opt
2019-05-29 23:17:00 -07:00
2019-07-05 19:09:01 -07:00
cd ..
end
## EOF