From 21f49d95295a7b95df3dc5443b2a3f68129f838d Mon Sep 17 00:00:00 2001 From: aboyko Date: Mon, 31 Jul 2023 17:15:20 -0400 Subject: [PATCH] [GHA-Build] integer comparisons --- .github/scripts/clear-s3-caches.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/scripts/clear-s3-caches.sh b/.github/scripts/clear-s3-caches.sh index 48a1637e0..94e4a823b 100755 --- a/.github/scripts/clear-s3-caches.sh +++ b/.github/scripts/clear-s3-caches.sh @@ -20,15 +20,15 @@ counter=0 json="" for file in $files do - if [ $counter == 0]; then + if [[ "$counter" eq 0 ]]; then json="\"{ \"files\": [\n" fi if [[ "$file" =~ ^"s3://dist.springsource.com" ]]; then - let "counter++" + ((counter++)) path=${file:26} json="${json}\"http://dist.springsource.com${path}\",\n\"http://dist.springsource.com${path}\",\n\"http://download.springsource.com${path}\",\n\"https://download.springsource.com${path}\",\n" fi - if [ $counter == 10]; then + if [[ "$counter" eq 10 ]]; then json="${json:-2}\n]}" echo $json json=""