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