Adding zshrc setup to installation script

This commit is contained in:
Yinka Erinle
2012-10-17 19:56:12 +01:00
parent 800cf6928f
commit 860ba6366e

View File

@@ -139,6 +139,7 @@ SNIPPET='[[ -s "$HOME/.gvm/bin/gvm-init.sh" ]] && source "$HOME/.gvm/bin/gvm-ini
BASH_PROFILE="$HOME/.bash_profile"
PROFILE="$HOME/.profile"
BASHRC="$HOME/.bashrc"
ZSHRC="$HOME/.zshrc"
if [ ! -f "$BASH_PROFILE" -a ! -f "$PROFILE" ]; then
echo "#!/bin/bash" > "$BASH_PROFILE"
@@ -171,6 +172,17 @@ else
fi
fi
if [ ! -f "$ZSHRC" ]; then
echo "#!/bin/bash" > "$ZSHRC"
echo "$SNIPPET" >> "$ZSHRC"
echo "Created and initialised $ZSHRC"
else
if [ -z "$(grep 'gvm-init.sh' $ZSHRC)" ]; then
echo -e "\n$SNIPPET" >> "$ZSHRC"
echo "Updated existing $ZSHRC"
fi
fi
echo "All done!"
echo ""