Merge pull request #31698 from sarfraj89/fix-shellcheck-lint

Lint sync-repo.sh with ShellCheck
pull/31554/merge
Evans Mungai 1 month ago committed by GitHub
commit c3a0d3b860
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -44,6 +44,7 @@ verify_prereqs() {
}
confirm() {
# shellcheck disable=SC2154
case $response in
[yY][eE][sS]|[yY])
true
@ -66,11 +67,11 @@ main() {
verify_prereqs
# dry run of the command
gsutil rsync -d -n $1 gs://$2
gsutil rsync -d -n "$1" gs://"$2"
read -p "Are you sure you would like to continue with these changes? [y/N]} " confirm
read -r -p "Are you sure you would like to continue with these changes? [y/N] " confirm
if [[ $confirm =~ [yY](es)* ]]; then
gsutil rsync -d $1 gs://$2
gsutil rsync -d "$1" gs://"$2"
else
error_exit "Discontinuing sync process."
fi

Loading…
Cancel
Save