Update gam-install.sh

This commit is contained in:
Jay Lee
2017-04-24 12:38:35 -04:00
committed by GitHub
parent 0ea0c416ec
commit e43ebd4d40

View File

@ -30,14 +30,14 @@ while getopts "hd:a:o:lp:u:r:v:" OPTION
do do
case $OPTION in case $OPTION in
h) usage; exit;; h) usage; exit;;
d) target_dir=$OPTARG;; d) target_dir="$OPTARG";;
a) gamarch=$OPTARG;; a) gamarch="$OPTARG";;
o) gamos=$OPTARG;; o) gamos="$OPTARG";;
l) upgrade_only=true;; l) upgrade_only=true;;
p) update_profile=$OPTARG;; p) update_profile="$OPTARG";;
u) adminuser=$OPTARG;; u) adminuser="$OPTARG";;
r) regularuser=$OPTARG;; r) regularuser="$OPTARG";;
v) gamversion=$OPTARG;; v) gamversion="$OPTARG";;
?) usage; exit;; ?) usage; exit;;
esac esac
done done
@ -160,7 +160,7 @@ echo_yellow "Downloading file $name from $browser_download_url to $temp_archive_
mkdir -p $target_dir mkdir -p $target_dir
echo_yellow "Extracting archive to $target_dir" echo_yellow "Extracting archive to $target_dir"
tar xf $temp_archive_dir/$name -C $target_dir tar xf $temp_archive_dir/$name -C "$target_dir"
rc=$? rc=$?
if (( $rc != 0 )); then if (( $rc != 0 )); then
echo_red "ERROR: extracting the GAM archive with tar failed with error $rc. Exiting." echo_red "ERROR: extracting the GAM archive with tar failed with error $rc. Exiting."