mirror of
https://github.com/sdkman/sdkman-cli.git
synced 2026-02-01 02:03:18 -05:00
Adding zshrc setup to installation script
This commit is contained in:
@@ -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 ""
|
||||
|
||||
Reference in New Issue
Block a user