]> git.ipfire.org Git - people/ms/nightly-builds.git/commitdiff
Keep two builds
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 15 Oct 2015 19:30:45 +0000 (21:30 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 15 Oct 2015 19:30:45 +0000 (21:30 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
server-scripts/ipfire-cleanup-nightly-builds.sh

index bb6f89e1949e97d6238877e9095d7dfdc5c43cfe..3abe283622e538283d7eff214ff5d438c8fa01cf 100755 (executable)
@@ -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