From f11e92d8fa132f1d22b085c68b78fd3d997a75e6 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 1 May 2019 19:15:28 +0200 Subject: publish-purge: only purge if ttl is a positive integer (so 0 means "do not purge") --- publish-purge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'publish-purge') diff --git a/publish-purge b/publish-purge index 0be0fd7..cc17338 100755 --- a/publish-purge +++ b/publish-purge @@ -67,7 +67,7 @@ cleanit() fi fi - if test_if_ancient "$d" "$ttl"; then + if [ "$ttl" -gt 0 ] && test_if_ancient "$d" "$ttl"; then [ "$optVerbose" -ge "1" ] && echo "- Purging: $d" [ "$optDonot" = "1" ] || rm -rf "$d" fi -- cgit v1.2.3