From: Eric B. <ri...@us...> - 2009-11-23 16:26:34
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Bacula Documentation". The branch, master has been updated via 710dd41ca899be43da8e700a14ef598ad15b2055 (commit) from c816cd02a3040949ca4507d32f8e69a729826a3a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 710dd41ca899be43da8e700a14ef598ad15b2055 Author: Eric Bollengier <er...@eb...> Date: Mon Nov 23 17:26:46 2009 +0100 update sourceforge to bacula.org download script ----------------------------------------------------------------------- Summary of changes: diff --git a/docs/tools/sf2bacula_downloads.pl b/docs/tools/sf2bacula_downloads.pl index 23e2dc1..57a78a0 100755 --- a/docs/tools/sf2bacula_downloads.pl +++ b/docs/tools/sf2bacula_downloads.pl @@ -51,11 +51,6 @@ while (my $l = <FP>) { # cat vers file if ($l =~ m!href="(/projects/bacula/files/(.+?)/(.+?)/(.+?)/download)"!) { - if ($cur && $cur->{date} && !exists $seen{$cur->{file}}) { - push @{$cats{$cur->{cat}}}, $cur; - $seen{$cur->{file}} = 1; - } - $cur = { dl => $1, cat => $2, @@ -65,7 +60,7 @@ while (my $l = <FP>) } # the size and the date are just after - if ($l =~ m!<td>([\d\.]+ [KMG]B)</td>!) { + if ($cur && $l =~ m!<td>([\d\.]+ [KMG]B)</td>!) { $cur->{size} = $1; do { $l = <FP>; @@ -73,6 +68,13 @@ while (my $l = <FP>) $cur->{date} = $1; } } while (!$cur->{date}); + + # once we have a full $cur element, we can store it + if (!exists $seen{$cur->{file}}) { + push @{$cats{$cur->{cat}}}, $cur; + $seen{$cur->{file}} = 1; + $cur = undef; + } } } close(FP); hooks/post-receive -- Bacula Documentation |