From d4a2787fca9373bd8fd0a8df69acd0df69b3930e Mon Sep 17 00:00:00 2001 From: sarfraj89 Date: Tue, 6 Jan 2026 23:31:18 +0530 Subject: [PATCH 1/2] Lint sync-repo.sh with ShellCheck Signed-off-by: sarfraj89 --- scripts/sync-repo.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/sync-repo.sh b/scripts/sync-repo.sh index 453102072..0143c597e 100755 --- a/scripts/sync-repo.sh +++ b/scripts/sync-repo.sh @@ -44,7 +44,7 @@ verify_prereqs() { } confirm() { - case $response in + case $confirm in [yY][eE][sS]|[yY]) true ;; @@ -66,11 +66,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 From 9125b84f450e350c5bafb8de2b42701532b04c29 Mon Sep 17 00:00:00 2001 From: Sarfraj Khan Date: Thu, 8 Jan 2026 17:15:00 +0530 Subject: [PATCH 2/2] Suppress SC2154 without changing behavior Signed-off-by: Sarfraj Khan --- scripts/sync-repo.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/sync-repo.sh b/scripts/sync-repo.sh index 0143c597e..0651d3634 100755 --- a/scripts/sync-repo.sh +++ b/scripts/sync-repo.sh @@ -44,7 +44,8 @@ verify_prereqs() { } confirm() { - case $confirm in + # shellcheck disable=SC2154 + case $response in [yY][eE][sS]|[yY]) true ;;