Sorry i'm stupid. giovanni@ noted a 'snapdl' written 'slapdl' and I
have a worse one: if ($pretend = "yes") {... :-( sorry.

this diff is less bad:

diff -r abd23b25e85a -r 167273a1f4e9 snapdl.pl
--- a/snapdl.pl Sun May 02 03:05:44 2010 +0200
+++ b/snapdl.pl Wed May 19 11:27:11 2010 +0200
@@ -47,9 +47,7 @@
 my %mirrors;
 my $current_country;
 # autovivify %mirror :
-# $mirror{'Country'} = {
-#         ["not checked", [qw(ftp://blala.com http://blili.org)]],
-# }
+# $mirror{'Country'} = ["not checked", [qw(ftp://blala.com http://blili.org)]]
 while (<$mirrors_dat>) {
        chomp;
        if (/^GC\s+([a-zA-Z ]+)/) {
@@ -91,7 +89,7 @@
         my $operation;
         my $pattern;
         if ($line eq "done" || $line eq "") {
-                print "Write the choosed countries in ~/slapdl/.countries to 
check them by default? [no] ";
+                print "Write the choosed countries in ~/.snapdl/countries to 
check them by default? [no] ";
                chomp($line = <STDIN>);
                if ($line =~ /y|yes/i) {
                        open $fh_countries, '>', 
"$ENV{'HOME'}/.snapdl/countries"
@@ -318,15 +316,20 @@
 
 my @stripped_SHA256; #SHA256 stripped from undownloaded sets
 
-my @checked_sets;
+if ($pretend eq "yes") {
+        print "Pretending:\n";
+}
+
 for my $set (sort keys %sets) {
-                if ($sets{$set} eq "checked"
-                    && $SHA256 =~ /(SHA256 \($set\) = [a-f0-9]+\n)/s) {
-                        if ($pretend eq "no") {
-                                system("ftp", "-r 1", 
"$server/pub/OpenBSD/snapshots/$hw/$set");
-                                push @stripped_SHA256, $1;
-                        }
+        if ($sets{$set} eq "checked"
+            && $SHA256 =~ /(SHA256 \($set\) = [a-f0-9]+\n)/s) {
+                if ($pretend eq "no") {
+                        system("ftp", "-r 1", 
"$server/pub/OpenBSD/snapshots/$hw/$set");
+                        push @stripped_SHA256, $1;
+                } else {
+                        print "ftp -r 1 
$server/pub/OpenBSD/snapshots/$hw/$set\n";
                 }
+        }
 }
 
 if ($pretend eq "no") {
@@ -339,7 +342,6 @@
 
        my $list_ref = shift @_;
        my $col_size = ($#{$list_ref} % 4 == 0) ? $#{$list_ref} / 4 : 
$#{$list_ref} / 4 + 1 ;
-       my $one; my $two; my $three;
        for (my $i = 0; $i <= $col_size; $i++) {
                printf "%-20s",$list_ref->[$i];
                printf "%-20s",$list_ref->[$i + $col_size ] 

Reply via email to