#!/usr/bin/env bash pull_plugins() { local res for plugin in ./* do cd $plugin git pull -f res=$? if [[ $res -ne 0 ]] && [[ $res -ne 128 ]] then echo "error $res in $PWD" exit 1 fi if [[ $plugin = ./base16-vim ]] then echo "fixing attrs for $plugin" sed -i '/Base16hi/! s/a:\(attr\|guisp\)/l:\1/g' colors/*.vim fi if [[ -d doc ]] then echo "generating tags for $PWD" vim --cmd "helptags doc/" --cmd "q" fi cd .. done } cd_and_pull() { cd $1 pull_plugins cd .. } cd ~/.vim/pack for folder in ./* do cd $folder [[ -d start ]] && cd_and_pull start [[ -d opt ]] && [[ $1 = opt ]] && cd_and_pull opt cd .. done