From: Michael Tremer Date: Thu, 15 Oct 2015 19:30:45 +0000 (+0200) Subject: Keep two builds X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43f98cde0be9557ae074a54eeac01baf451fb632;p=people%2Fms%2Fnightly-builds.git Keep two builds Signed-off-by: Michael Tremer --- diff --git a/server-scripts/ipfire-cleanup-nightly-builds.sh b/server-scripts/ipfire-cleanup-nightly-builds.sh index bb6f89e..3abe283 100755 --- a/server-scripts/ipfire-cleanup-nightly-builds.sh +++ b/server-scripts/ipfire-cleanup-nightly-builds.sh @@ -11,8 +11,8 @@ for build in $(find "${BASEDIR}" -mindepth 2 -maxdepth 2 -type d | sort -nr); do time="$(basename "${build}")" [ "${time}" = "latest" ] && continue - # Never delete the last build - if [ "${counter}" -lt 1 ]; then + # Never delete the last two builds + if [ "${counter}" -lt 2 ]; then counter=$(( ${counter} + 1 )) continue fi