diff --git a/rsync-timefilter.pl b/rsync-timefilter.pl index b9d55e9..827a2ac 100755 --- a/rsync-timefilter.pl +++ b/rsync-timefilter.pl @@ -15,11 +15,10 @@ my $rsync_dst; my $age; GetOptions ("source=s" => \$rsync_src, - "destination=s" => \$rsync_dst, - "age=i" => \$age) + "destination=s" => \$rsync_dst, + "age=i" => \$age) or die("Error. Wrong arguments!\n"); - my $now = DateTime->now(); my $cutoff_timestamp = $now - DateTime::Duration->new(days => $age); my $parser = DateTime::Format::Strptime->new(