mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-09 14:13:35 +00:00
Update gam-install.sh
This commit is contained in:
@ -157,7 +157,7 @@ echo_yellow "Downloading file $name from $browser_download_url to $temp_archive_
|
|||||||
# Save archive to temp w/o losing our path
|
# Save archive to temp w/o losing our path
|
||||||
(cd $temp_archive_dir && curl -O -L $browser_download_url)
|
(cd $temp_archive_dir && curl -O -L $browser_download_url)
|
||||||
|
|
||||||
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"
|
||||||
@ -171,7 +171,7 @@ fi
|
|||||||
|
|
||||||
if [ "$upgrade_only" = true ]; then
|
if [ "$upgrade_only" = true ]; then
|
||||||
echo_green "Here's information about your GAM upgrade:"
|
echo_green "Here's information about your GAM upgrade:"
|
||||||
$target_dir/gam/gam version
|
"$target_dir/gam/gam" version
|
||||||
rc=$?
|
rc=$?
|
||||||
if (( $rc != 0 )); then
|
if (( $rc != 0 )); then
|
||||||
echo_red "ERROR: Failed running GAM for the first time with $rc. Please report this error to GAM mailing list. Exiting."
|
echo_red "ERROR: Failed running GAM for the first time with $rc. Please report this error to GAM mailing list. Exiting."
|
||||||
@ -219,7 +219,7 @@ while true; do
|
|||||||
if [ "$adminuser" == "" ]; then
|
if [ "$adminuser" == "" ]; then
|
||||||
read -p "Please enter your G Suite admin email address: " adminuser
|
read -p "Please enter your G Suite admin email address: " adminuser
|
||||||
fi
|
fi
|
||||||
$target_dir/gam/gam create project $adminuser
|
"$target_dir/gam/gam" create project $adminuser
|
||||||
rc=$?
|
rc=$?
|
||||||
if (( $rc == 0 )); then
|
if (( $rc == 0 )); then
|
||||||
echo_green "Project creation complete."
|
echo_green "Project creation complete."
|
||||||
@ -244,7 +244,7 @@ while $project_created; do
|
|||||||
read -p "Are you ready to authorize GAM to perform G Suite management operations as your admin account? (yes or no) " yn
|
read -p "Are you ready to authorize GAM to perform G Suite management operations as your admin account? (yes or no) " yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]*)
|
[Yy]*)
|
||||||
$target_dir/gam/gam oauth create $adminuser
|
"$target_dir/gam/gam" oauth create $adminuser
|
||||||
rc=$?
|
rc=$?
|
||||||
if (( $rc == 0 )); then
|
if (( $rc == 0 )); then
|
||||||
echo_green "Admin authorization complete."
|
echo_green "Admin authorization complete."
|
||||||
@ -273,7 +273,7 @@ while $project_created; do
|
|||||||
read -p "Please enter the email address of a regular G Suite user: " regularuser
|
read -p "Please enter the email address of a regular G Suite user: " regularuser
|
||||||
fi
|
fi
|
||||||
echo_yellow "Great! Checking service account scopes.This will fail the first time. Follow the steps to authorize and retry. It can take a few minutes for scopes to PASS after they've been authorized in the admin console."
|
echo_yellow "Great! Checking service account scopes.This will fail the first time. Follow the steps to authorize and retry. It can take a few minutes for scopes to PASS after they've been authorized in the admin console."
|
||||||
$target_dir/gam/gam user $adminuser check serviceaccount
|
"$target_dir/gam/gam" user $adminuser check serviceaccount
|
||||||
rc=$?
|
rc=$?
|
||||||
if (( $rc == 0 )); then
|
if (( $rc == 0 )); then
|
||||||
echo_green "Service account authorization complete."
|
echo_green "Service account authorization complete."
|
||||||
@ -294,7 +294,7 @@ while $project_created; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo_green "Here's information about your new GAM installation:"
|
echo_green "Here's information about your new GAM installation:"
|
||||||
$target_dir/gam/gam version
|
"$target_dir/gam/gam" version
|
||||||
rc=$?
|
rc=$?
|
||||||
if (( $rc != 0 )); then
|
if (( $rc != 0 )); then
|
||||||
echo_red "ERROR: Failed running GAM for the first time with $rc. Please report this error to GAM mailing list. Exiting."
|
echo_red "ERROR: Failed running GAM for the first time with $rc. Please report this error to GAM mailing list. Exiting."
|
||||||
|
Reference in New Issue
Block a user