summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpublish-purge6
1 files changed, 5 insertions, 1 deletions
diff --git a/publish-purge b/publish-purge
index d5beddd..a6628be 100755
--- a/publish-purge
+++ b/publish-purge
@@ -34,7 +34,11 @@ test_if_ancient()
local d="$1"
local ttl="$2"
- mtime="$(stat --format "%Y" "$d")"
+ if [ -e "$d/.publish.ttl" ]; then
+ mtime="$(stat --format "%Y" "$d/.publish.ttl")"
+ else
+ mtime="$(stat --format "%Y" "$d")"
+ fi
tod="$(($mtime + 3600*24*$ttl))"
now="$(date +%s)"