From 96b2242079e941ae83eeda8c2f9ba03a7c9854b0 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 20 Aug 2020 11:23:07 +0100 Subject: [PATCH] expire-iso8601: tidy docs and exit status Signed-off-by: Ian Jackson --- scripts/expire-iso8601 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/expire-iso8601 b/scripts/expire-iso8601 index 548baae..8ec0aef 100755 --- a/scripts/expire-iso8601 +++ b/scripts/expire-iso8601 @@ -24,10 +24,11 @@ usage: options: -u is measured in units of seconds (default is 86400, so is in days) - -s allow kept items to be seconds shorter apart than - specified; default is 10% of - -n do not really delete - -r recursive removal (rm -r) + -s allow kept items to be seconds shorter or + longer apart than specified; default is 0.1 unit + -n do not really delete + -r recursive removal (rm -r) + --help example: /home/ian/junk/expire-iso8601 14x1 4x7 uses units of 86400s (1 day) with a slop of 8640 @@ -41,7 +42,7 @@ exit status: 0 ok 4 rm failed 8 bad usage - 16 catastrophic failure + -1 catastrophic failure END use POSIX; @@ -196,7 +197,7 @@ sub do_rm ($) { if ($rm) { my $r= system 'rm', ($recurse ? ('-r') : ()), "--", $fn; die "run rm: $!\n" unless defined($r) && $r >= 0; - exit 12 if $r; + exit 4 if $r; } } -- 2.30.2