Few fixes for gam alias

This commit is contained in:
Jay Lee
2018-03-29 09:07:05 -04:00
parent ce2e379f30
commit a44d4f0872

View File

@@ -42,6 +42,9 @@ do
esac
done
# remove possible / from end of target_dir
target_dir=${target_dir%/}
update_profile() {
[ -f "$1" ] || return 1
@@ -184,7 +187,7 @@ fi
# Update profile to add gam command
if [ "$update_profile" = true ]; then
alias_line="alias gam=\"$target_dir/gam/gam\""
alias_line="gam() { \"$target_dir/gam/gam\" \"\$@\" ; }"
if [ "$gamos" == "linux" ]; then
update_profile "$HOME/.bashrc" || update_profile "$HOME/.bash_profile"
elif [ "$gamos" == "macos" ]; then