From b271d0d656787ac07acff5ee05cddeeeee4b3614 Mon Sep 17 00:00:00 2001 From: Andreas Gruhler Date: Thu, 12 Sep 2024 17:43:00 +0200 Subject: [PATCH] fix(shellcheck): SC2004, no $ on arithmetic var --- kubernetes/vault-snapshot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/vault-snapshot.sh b/kubernetes/vault-snapshot.sh index 84f96bb..fb71654 100644 --- a/kubernetes/vault-snapshot.sh +++ b/kubernetes/vault-snapshot.sh @@ -17,7 +17,7 @@ if [ "${S3_EXPIRE_DAYS}" ]; then s3cmd ls "${S3_URI}" --host="${S3_HOST}" --host-bucket="${S3_BUCKET}" | while read -r line; do createDate=$(echo "$line" | awk '{print $1" "$2}') createDate=$(date -d"$createDate" +%s) - olderThan=$(date --date @$(($(date +%s) - 86400*$S3_EXPIRE_DAYS)) +%s) + olderThan=$(date --date @$(($(date +%s) - 86400*S3_EXPIRE_DAYS)) +%s) if [ "$createDate" -lt "$olderThan" ]; then fileName=$(echo "$line" | awk '{print $4}') if [ "$fileName" != "" ]; then