my @days = qw(Sun Mon Tue Wed Thu Fri Sat Sun);
#< Config START >
-my $scan_dir = '/xxxxxxxxxxxxxxxxxxxxxx/sf-download/';
+my $scan_dir = shift(@ARGV)
+ or die "Local package directory not specified (first argument)\n";
+my $save_rss_file = shift(@ARGV)
+ or die "RSS output file path not specified (second argument)\n";
my $base_dlurl = 'https://www.privoxy.org/sf-download-mirror/';
-my $save_rss_file ='/xxxxxxxxxxxxxxxxxxxxxx/release.xml'; # e.g., release.rss
my $maxlimit = 1000;
my $max_advertised_files = 100;
$target_line .= '<pubDate>';
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
gmtime($target_time);
- $target_line .=
- "$days[$wday], $mday $months[$mon] "
- . ($year + 1900)
- . " $hour:$min:$sec GMT";
+ $target_line .= sprintf("%s, %s %s %d %.2d:%.2d:%.2d GMT",
+ $days[$wday], $mday, $months[$mon], ($year + 1900),
+ $hour, $min, $sec);
$target_line .= '</pubDate></item>';
# Add it to Array