From 76d4dcfcf8d62cb80fe66e9943e7bf2fe8259db1 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 19 Sep 2023 01:23:24 +0200 Subject: [PATCH] Replaced occurrence of `let` with arithmetic expansion. drone-ci uses /bin/sh instead of bash, so let is not available. --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 3b7c997d96..5aafb1f973 100644 --- a/.drone.yml +++ b/.drone.yml @@ -455,7 +455,7 @@ steps: - echo "-- Cleaning up older apt releases" - | find "$BUCKET_MNT/apt/dists" -mindepth 3 -maxdepth 3 -type d | tail -n+2 | while read reldir; do - let pkg_to_remove=$(ls "$reldir" | wc -l)-$MAX_PKG_PER_BRANCH + pkg_to_remove=$(( $(ls "$reldir" | wc -l) - $MAX_PKG_PER_BRANCH )) [ $pkg_to_remove -le 0 ] && break ls -rt "$reldir" | head -n$pkg_to_remove | xargs printf -- "$reldir/%s\n" | xargs rm -f done