summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2019-05-01 19:15:28 +0200
committerPeter Palfrader <peter@palfrader.org>2019-05-01 19:15:28 +0200
commitf11e92d8fa132f1d22b085c68b78fd3d997a75e6 (patch)
tree76c55dbfd4e0092ff8aff87c1cdfb483baa89df5
parent0157d644249c084c78690476e108d63ceb5cf5e2 (diff)
publish-purge: only purge if ttl is a positive integer (so 0 means "do not purge")HEADmaster
-rwxr-xr-xpublish-purge2
1 files changed, 1 insertions, 1 deletions
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