scripts/fish/update-vim-plugins

46 lines
649 B
Plaintext
Raw Permalink Normal View History

2019-08-18 06:26:48 -07:00
#!/usr/bin/env fish
2019-05-29 23:17:00 -07:00
function pull-vim-plugin -d 'Updates all vim plugins in the current directory'
cd $argv[1]
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
2019-07-05 19:09:01 -07:00
cd ..
end
2019-05-29 23:17:00 -07:00
function update-vim-plugins -d 'Updates all vim plugins'
cd ~/.vim/pack
2019-05-29 23:17:00 -07:00
for folder in ./*
cd $folder
2019-05-29 23:17:00 -07:00
test -d start; and pull-vim-plugin start
test -d opt; and pull-vim-plugin opt
2019-05-29 23:17:00 -07:00
cd ..
end
end
## EOF