Replaced occurrence of `let` with arithmetic expansion.
continuous-integration/drone/push Build is passing Details

drone-ci uses /bin/sh instead of bash, so let is not available.
This commit is contained in:
Fabio Manganiello 2023-09-19 01:23:24 +02:00
parent 92d7ce8305
commit 76d4dcfcf8
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 1 additions and 1 deletions

View File

@ -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