Skip to content

Commit

Permalink
Add rcm post-up hook copied from thoughtbot
Browse files Browse the repository at this point in the history
  • Loading branch information
mphstudios committed Sep 25, 2018
1 parent c7e219c commit 83dc9ed
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions hooks/post-up
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

# Install or Upgrade vim-plug minimalist plugin manager
# https://github.com/junegunn/vim-plug
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

# Install or update plugins
vim -u "$HOME/.vim/bundles.vim" +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

0 comments on commit 83dc9ed

Please sign in to comment.