forked from thoughtbot/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
post-up
executable file
·40 lines (33 loc) · 1.09 KB
/
post-up
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
touch "$HOME"/.psqlrc.local
if [ ! -e "$HOME"/.vim/autoload/plug.vim ]; then
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 +PlugInstall +PlugClean! +qa
# detect old OS X broken /etc/zshenv and suggest rename
if grep -qw path_helper /etc/zshenv 2>/dev/null; then
if [ -t 2 ]; then
fg_red=$'\e[31m'
fg_bold_white=$'\e[1;37m'
reset_color=$'\e[m'
else
fg_red=""
fg_bold_white=""
reset_color=""
fi
# resolve BASH_SOURCE to absolute path
bash_source="$BASH_SOURCE"
if [[ $bash_source == */* ]]; then
pushd "${bash_source%/*}" >/dev/null
bash_source="${PWD}/${bash_source##*/}"
popd >/dev/null
fi
cat <<MSG >&2
${fg_red}Warning:${reset_color} \`/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':
${fg_bold_white}sudo mv /etc/{zshenv,zprofile}${reset_color}
(called from ${bash_source}:${LINENO})
MSG
fi