[Frugalware-darcs] pacman-tools: cw - blacklisted dirs

Zsolt SZALAI xbit at frugalware.org
Thu Mar 16 17:50:41 CET 2006


[cw - blacklisted dirs
Zsolt SZALAI <xbit at frugalware.org>**20060209150743
  also note the NOTE in the begining of the source code!
] {
hunk ./cw 3
+# NOTES:
+#  -b can be used only with '' if multiple arguments given (no Getopt::Long pkg yet)
+#
+#  . is the only directory it scans! ADD $input{dirs} support!
+#  write the html output functions
+#  write a good pod
+
hunk ./cw 134
-    
+
hunk ./cw 139
-#my @dirs;
-#if (@ARGV) { @dirs = @ARGV; } else  {@dirs = ('.',);}  # // cant handler arrays :-/
-#my $time = $opts{t} || 30;
-#                        --------------->>>>>>>>>>>>>>>>>>open STDERR, "/dev/null" unless $opts{e};
-    
+    my @blacklist = split / /,$input{blacklist};
hunk ./cw 148
+		do {next if $File::Find::dir =~ /$blacklist[$_]/} for 0..scalar @blacklist-1;
hunk ./cw 159
-
+	    $input{blacklist} = 'apps base';
hunk ./cw 162
-		    
+		    do {goto OUT if $File::Find::dir =~ /$blacklist[$_]/} for 0..scalar @blacklist-1;
hunk ./cw 182
+	      OUT: next;
hunk ./cw 203
-getopts('svcmhet:d:', \%opts);
+getopts('svcmhet:d:b:', \%opts);
hunk ./cw 213
+         -b blacklists given dirs
hunk ./cw 272
+#if (@ARGV) { @dirs = @ARGV; } else  {@dirs = ('.',);}  # // cant handler arrays :-/
hunk ./cw 282
+			      blacklist => $opts{b},   # a string!
}


More information about the Frugalware-darcs mailing list