summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2014-09-01 11:15:27 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2014-09-01 11:15:27 (GMT)
commit1c1930ac5260847b9b6e63caf3ba844be8a7d41f (patch) (side-by-side diff)
tree427078c4398d379dfafb0edf81ca1bb66b34a5a4
parentcd26df51a1cb73e3f0a475b83bf7f8c6e67176f7 (diff)
downloadbeam-1c1930ac5260847b9b6e63caf3ba844be8a7d41f.tar.gz
beam-1c1930ac5260847b9b6e63caf3ba844be8a7d41f.tar.bz2
Bugfix.
* cleaner.in: Fix regexp for extracting week number from the filename.
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xcleaner.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/cleaner.in b/cleaner.in
index 0a9a35f..a35b605 100755
--- a/cleaner.in
+++ b/cleaner.in
@@ -85,13 +85,13 @@ if [ -z "$suffix" ]; then
else
find $dir -maxdepth 1 -type f -name "*$suffix" -printf '%f\n'
fi |
while read name
do
$verbose \# considering $name
- week=$(expr "$name" : '[^-][^-]*-\([0-9][0-9]*\)-.*')
+ week=$(expr "$name" : '.*-\([0-9][0-9]*\)-[0-9][0-9]*-[0-9][0-9]*.*$')
if [ $thisweek -ge $week ]; then
if [ $(expr $thisweek - $week) -gt $retainweeks ]; then
$verbose \# removing $name
$dry_run rm $dir/$name
fi
else

Return to:

Send suggestions and report system problems to the System administrator.