Skip to content

Commit

Permalink
Remnant fixes for 6197ef8
Browse files Browse the repository at this point in the history
  • Loading branch information
Akianonymus committed Jul 25, 2020
1 parent 2c82d0e commit 128608d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bash/google-oauth2.bash
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ done && _update_config CLIENT_ID "${CLIENT_ID}" "${CONFIG}"
until [[ -n ${CLIENT_SECRET} ]]; do
[[ -n ${client_secret} ]] && _clear_line 1
printf "Client Secret: " && read -r CLIENT_SECRET && client_secret=1
done && _update_config CLIENT_ID "${CLIENT_ID}" "${CONFIG}"
done && _update_config CLIENT_SECRET "${CLIENT_SECRET}" "${CONFIG}"

for _ in 1 2; do _clear_line 1; done

Expand Down
6 changes: 3 additions & 3 deletions sh/google-oauth2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@ until [ -n "${CLIENT_ID}" ]; do
printf "Client ID: " && read -r CLIENT_ID && client_id=1
done && _update_config CLIENT_ID "${CLIENT_ID}" "${CONFIG}"

until [ -z "${CLIENT_SECRET}" ]; do
until [ -n "${CLIENT_SECRET}" ]; do
[ -n "${client_secret}" ] && _clear_line 1
printf "Client Secret: " && read -r CLIENT_SECRET && client_secret=1
done && _update_config CLIENT_ID "${CLIENT_ID}" "${CONFIG}"
done && _update_config CLIENT_SECRET "${CLIENT_SECRET}" "${CONFIG}"

for _ in 1 2; do _clear_line 1; done

if [ "${1}" = create ]; then
printf "\nVisit the below URL, tap on allow and then enter the code obtained:\n"
URL="https://accounts.google.com/o/oauth2/auth?client_id=${CLIENT_ID}&redirect_uri=${REDIRECT_URI}&scope=${SCOPE}&response_type=code&prompt=consent"
printf "%s\n" "${URL}"
until [ -z "${CODE}" ]; do
until [ -n "${CODE}" ]; do
[ -n "${code}" ] && _clear_line 1
printf "Enter the authorization code: " && read -r CODE && code=1
done
Expand Down
2 changes: 1 addition & 1 deletion sh/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ _check_credentials() {
printf "\nVisit the below URL, tap on allow and then enter the code obtained:\n"
URL="https://accounts.google.com/o/oauth2/auth?client_id=${CLIENT_ID}&redirect_uri=${REDIRECT_URI}&scope=${SCOPE}&response_type=code&prompt=consent"
printf "%s\n" "${URL}"
until [ -z "${CODE}" ]; do
until [ -n "${CODE}" ]; do
[ -n "${code}" ] && _clear_line 1
printf "Enter the authorization code: " && read -r CODE && code=1
done
Expand Down

0 comments on commit 128608d

Please sign in to comment.