summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2012-05-14 23:38:38 (GMT)
committerChristian Pointner <equinox@helsinki.at>2012-05-14 23:38:38 (GMT)
commit089a8c93f10f45fdff37b67a30cbfe1b00c48c94 (patch)
treed1e9fd3a8195303c8aa7c1f8c2aa95c04812b8dc
parent99f48d56488c725c839d85fbaaf64c1cdebfa597 (diff)
fixed rhimport regex
-rwxr-xr-xrhimport-wl4
1 files changed, 2 insertions, 2 deletions
diff --git a/rhimport-wl b/rhimport-wl
index aac05bb..91dd4ff 100755
--- a/rhimport-wl
+++ b/rhimport-wl
@@ -73,13 +73,13 @@ my $tfile;
if(Date::Calc::Day_of_Week(@today) == 7) {
@import_date = Date::Calc::Add_Delta_Days($today[0], $today[1], $today[2], 0);
$t = sprintf("%04d-%02d-%02d", $today[0], $today[1], $today[2]);
- $tfile = sprintf("[0-9-]+_%04d%02d%02d(-\d+)?.mp3", $today[0], $today[1], $today[2]);
+ $tfile = sprintf("[0-9-]+_%04d%02d%02d(-[0-9]+)?.mp3", $today[0], $today[1], $today[2]);
print "looking for files from today in RSS Feed ($tfile)\n";
} elsif(Date::Calc::Day_of_Week(@today) == 1) {
my @yesterday = Date::Calc::Add_Delta_Days($today[0], $today[1], $today[2], -1);
@import_date = @today;
$t = sprintf("%04d-%02d-%02d", $yesterday[0], $yesterday[1], $yesterday[2]);
- $tfile = sprintf("[0-9-]+_%04d%02d%02d(-\d+)?.mp3", $yesterday[0], $yesterday[1], $yesterday[2]);
+ $tfile = sprintf("[0-9-]+_%04d%02d%02d(-[0-9]+)?.mp3", $yesterday[0], $yesterday[1], $yesterday[2]);
print "looking for files from yesterday in RSS Feed ($tfile)\n";
} else {
print "it's neither Sunday nor Monday, please check cron script";