Update install.sh

This commit is contained in:
mannem srinivas 2024-09-16 15:50:58 +05:30 committed by GitHub
parent 27b84d69ea
commit 2626807234
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -509,21 +509,25 @@ EOF
# Determine the shell configuration file based on the current shell
case "$SHELL" in
*/bash)
CONFIG_FILE="$HOME/.bashrc"
;;
*/zsh)
CONFIG_FILE="$HOME/.zshrc"
;;
*)
echo "Unsupported shell: $SHELL"
exit 1
;;
esac
# Append the code to the appropriate configuration file
append_to_file "$CONFIG_FILE" "$CODE"
*/bash)
CONFIG_FILE="$HOME/.bashrc"
BASH_OR_ZSH=true
append_to_file "$CONFIG_FILE" "$CODE"
;;
*/zsh)
CONFIG_FILE="$HOME/.zshrc"
BASH_OR_ZSH=true
append_to_file "$CONFIG_FILE" "$CODE"
;;
*/ash)
CONFIG_FILE="$HOME/.profile" # or another appropriate file for ash
append_to_file "$CONFIG_FILE" "$CODE"
;;
*)
echo "Unsupported shell to add node version to the shell: $SHELL"
;;
esac
# Source nvm
# shellcheck source=/dev/null
. "$(nvm_install_dir)/nvm.sh"