git://git.camperquake.de
/
videosite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f7d9b22
)
videosite-dl: Add -d switch for debug messages
author
Ralf Ertzinger
<ralf@skytale.net>
Sat, 3 Sep 2011 20:18:54 +0000
(22:18 +0200)
committer
Ralf Ertzinger
<ralf@skytale.net>
Sat, 3 Sep 2011 20:18:54 +0000
(22:18 +0200)
videosite-dl.pl
patch
|
blob
|
history
diff --git
a/videosite-dl.pl
b/videosite-dl.pl
index
7313bf5
..
15e1bca
100755
(executable)
--- a/
videosite-dl.pl
+++ b/
videosite-dl.pl
@@
-56,8
+56,9
@@
my $m;
my @g;
my $bp;
my $info = 0;
+my $debug = 0;
-GetOptions("i" => \$info);
+GetOptions("i" => \$info
, "d" => \$debug
);
# This is some dark magic to find out our real base directory,
# where we hope to find our plugins.
@@
-72,6
+73,14
@@
unless(@g and defined($f)) {
exit 1;
}
+foreach (@g, $f) {
+ $_->setio(sub { printf(@_); print("\n"); } );
+
+ if ($debug) {
+ $_->setdebug(1);
+ }
+}
+
$f->setval('FILEPATTERN', './%3$s' . $ext);
foreach (@ARGV) {