dotfiles/update.sh
2022-04-02 15:50:26 +02:00

19 lines
390 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" stash
git -C "$dir" pull
git -C "$dir" 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"