mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-29 18:31:38 +00:00
Few fixes for gam alias
This commit is contained in:
@@ -42,6 +42,9 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# remove possible / from end of target_dir
|
||||||
|
target_dir=${target_dir%/}
|
||||||
|
|
||||||
update_profile() {
|
update_profile() {
|
||||||
[ -f "$1" ] || return 1
|
[ -f "$1" ] || return 1
|
||||||
|
|
||||||
@@ -184,7 +187,7 @@ fi
|
|||||||
|
|
||||||
# Update profile to add gam command
|
# Update profile to add gam command
|
||||||
if [ "$update_profile" = true ]; then
|
if [ "$update_profile" = true ]; then
|
||||||
alias_line="alias gam=\"$target_dir/gam/gam\""
|
alias_line="gam() { \"$target_dir/gam/gam\" \"\$@\" ; }"
|
||||||
if [ "$gamos" == "linux" ]; then
|
if [ "$gamos" == "linux" ]; then
|
||||||
update_profile "$HOME/.bashrc" || update_profile "$HOME/.bash_profile"
|
update_profile "$HOME/.bashrc" || update_profile "$HOME/.bash_profile"
|
||||||
elif [ "$gamos" == "macos" ]; then
|
elif [ "$gamos" == "macos" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user