Control: tags -1 +patch Greetings,
I wrote a patch that should cache the excuses file. It checks the last-modified header and only downloads if the remote file is newer. The cache is saved in ~/.devscript_cache/excuses.html.gz. If this is not writeable the cache is ignored and the file is downloaded and read directly. Regards Sven
diff -crB devscripts-2.14.6/scripts/grep-excuses.pl devscripts-2.14.6.new/scripts/grep-excuses.pl
*** devscripts-2.14.6/scripts/grep-excuses.pl 2014-08-17 01:29:57.395288804 +0200
--- devscripts-2.14.6.new/scripts/grep-excuses.pl 2014-08-17 01:30:15.443374884 +0200
***************
*** 179,186 ****
die "$progname: this program requires the wget package to be installed\n";
}
! open EXCUSES, "wget -q -O - $url | zcat |" or
! die "$progname: wget | zcat failed: $!\n";
my $item='';
my $mainlist=0;
--- 179,196 ----
die "$progname: this program requires the wget package to be installed\n";
}
! if (-d $cachedir or mkdir $cachedir) {
! chdir $cachedir;
! if (system("wget -N -q $url") != 0) {
! die "$progname: wget failed: $!\n";
! }
! open EXCUSES, "zcat $cachefile | " or
! die "$progname: zcat failed: $!\n";
! }
! else {
! open EXCUSES, "wget -q -O - $url | zcat |" or
! die "$progname: wget | zcat failed: $!\n";
! }
my $item='';
my $mainlist=0;
signature.asc
Description: PGP signature
_______________________________________________ devscripts-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
