scripts/scripts/update_vim_plugins.sh

50 lines
797 B
Bash
Raw Normal View History

#!/usr/bin/fish
2019-05-29 23:17:00 -07:00
function pull_plugins
2019-05-29 23:17:00 -07:00
for plugin in ./*
cd $plugin
git stash
2019-05-29 23:17:00 -07:00
git pull -f
set res $status
if test $res != 0; and test $res != 128
2019-05-29 23:17:00 -07:00
echo "error $res in $PWD"
exit 1
end
2019-05-29 23:17:00 -07:00
if test "$plugin" = ./base16-vim
2019-05-29 23:17:00 -07:00
echo "fixing attrs for $plugin"
sed -i '/Base16hi/! s/a:\(attr\|guisp\)/l:\1/g' colors/*.vim
end
2019-05-29 23:17:00 -07:00
if test -d doc
2019-05-29 23:17:00 -07:00
echo "generating tags for $PWD"
vim --cmd "helptags doc/" --cmd "q"
end
2019-05-29 23:17:00 -07:00
cd ..
end
end
function cd_and_pull
cd $argv[1]
2019-05-29 23:17:00 -07:00
pull_plugins
cd ..
end
2019-05-29 23:17:00 -07:00
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
2019-05-29 23:17:00 -07:00
cd ..
end
## EOF