mirror of
https://github.com/sdkman/sdkman-cli.git
synced 2026-02-01 02:03:18 -05:00
No longer adds snippets to .bashrc, .bash_profile and .profile on subsequent runs of install script.
This commit is contained in:
@@ -141,21 +141,27 @@ if [ ! -f "$PROFILE" -a ! -f "$BASHRC" ]; then
|
||||
echo "Created and updated .profile and .bashrc"
|
||||
else
|
||||
if [ -f "$BASHRC" ]; then
|
||||
echo "" >> "$BASHRC"
|
||||
echo "$SNIPPET" >> "$BASHRC"
|
||||
echo "Updated existing .bashrc"
|
||||
if [ -z "$(grep 'gvm-init.sh' $BASHRC)" ]; then
|
||||
echo "" >> "$BASHRC"
|
||||
echo "$SNIPPET" >> "$BASHRC"
|
||||
echo "Updated existing .bashrc"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f "$BASH_PROFILE" ]; then
|
||||
echo "" >> "$BASH_PROFILE"
|
||||
echo "$SNIPPET" >> "$BASH_PROFILE"
|
||||
echo "Updated existing .bash_profile"
|
||||
if [ -z "$(grep 'gvm-init.sh' $BASH_PROFILE)" ]; then
|
||||
echo "" >> "$BASH_PROFILE"
|
||||
echo "$SNIPPET" >> "$BASH_PROFILE"
|
||||
echo "Updated existing .bash_profile"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f "$PROFILE" ]; then
|
||||
echo "" >> "$PROFILE"
|
||||
echo "$SNIPPET" >> "$PROFILE"
|
||||
echo "Updated existing .profile"
|
||||
if [ -z "$(grep 'gvm-init.sh' $PROFILE)" ]; then
|
||||
echo "" >> "$PROFILE"
|
||||
echo "$SNIPPET" >> "$PROFILE"
|
||||
echo "Updated existing .profile"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user