dotfiles/update.sh
2022-02-15 08:34:33 +01:00

18 lines
398 B
Bash
Executable file

#!/bin/bash
GIT_DIRS=(. ~/.vim/bundle ~/.config/nvim ~/.tmux/plugins/tpm)
for dir in ${GIT_DIRS[@]} ; do
if [ -d "$dir" ] ; then
git -C "$dir" git stash
git -C "$dir" pull
git -C "$dir" git stash pop
else
echo "Skipping: $dir"
fi
done
if type nvim &>/dev/null ; then
nvim -c "autocmd User PackerComplete quitall" -c "PackerSync"
fi
vim -c ":PluginUpdate" -c ":q" -c ":q"