diff --git a/src/gam-install.sh b/src/gam-install.sh index 59de7801..c8663202 100755 --- a/src/gam-install.sh +++ b/src/gam-install.sh @@ -234,6 +234,18 @@ else echo_green "Finished extracting GAM archive." fi +# Update profile to add gam command +if [ "$update_profile" = true ]; then + alias_line="gam() { \"$target_dir/gam/gam\" \"\$@\" ; }" + if [ "$gamos" == "linux" ]; then + update_profile "$HOME/.bash_aliases" 0 || update_profile "$HOME/.bash_profile" 0 || update_profile "$HOME/.bashrc" 0 || update_profile "$HOME/.zshrc" 0 + elif [ "$gamos" == "macos" ]; then + update_profile "$HOME/.bash_aliases" 0 || update_profile "$HOME/.bash_profile" 0 || update_profile "$HOME/.bashrc" 0 || update_profile "$HOME/.zshrc" 0 || update_profile "$HOME/.profile" 1 + fi +else + echo_yellow "skipping profile update." +fi + if [ "$upgrade_only" = true ]; then echo_green "Here's information about your GAM upgrade:" "$target_dir/gam/gam" version extended @@ -247,18 +259,6 @@ if [ "$upgrade_only" = true ]; then exit fi -# Update profile to add gam command -if [ "$update_profile" = true ]; then - alias_line="gam() { \"$target_dir/gam/gam\" \"\$@\" ; }" - if [ "$gamos" == "linux" ]; then - update_profile "$HOME/.bash_aliases" 0 || update_profile "$HOME/.bash_profile" 0 || update_profile "$HOME/.bashrc" 0 || update_profile "$HOME/.zshrc" 0 - elif [ "$gamos" == "macos" ]; then - update_profile "$HOME/.bash_aliases" 0 || update_profile "$HOME/.bash_profile" 0 || update_profile "$HOME/.bashrc" 0 || update_profile "$HOME/.zshrc" 0 || update_profile "$HOME/.profile" 1 - fi -else - echo_yellow "skipping profile update." -fi - while true; do read -p "Can you run a full browser on this machine? (usually Y for MacOS, N for Linux if you SSH into this machine) " yn case $yn in