scatterd-dotfiles/hooks/post-up
Frank Loesche d6014c3a60 fix #524, update plugins
* if .vim/autoload/plug.vim already exists, then use PlugUpgrade to get
  the newest version. This should fix #524.
* change from PlugInstall to PlugUpdate which doesn't just install new
  plugins but also updates existing ones.
2017-08-25 15:23:25 -04:00

28 lines
775 B
Bash
Executable file

#!/bin/sh
touch "$HOME"/.psqlrc.local
if [ -e "$HOME"/.vim/autoload/plug.vim ]; then
vim -E -s +PlugUpgrade +qa
else
curl -fLo "$HOME"/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
fi
vim -u "$HOME"/.vimrc.bundles +PlugUpdate +PlugClean! +qa
reset -Q
# detect old OS X broken /etc/zshenv and suggest rename
if grep -qw path_helper /etc/zshenv 2>/dev/null; then
dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
cat <<MSG >&2
Warning: \`/etc/zshenv' configuration file on your system may cause unexpected
PATH changes on subsequent invocations of the zsh shell. The solution is to
rename the file to \`zprofile':
sudo mv /etc/{zshenv,zprofile}
(called from ${dir}/post-up:${LINENO})
MSG
fi