summaryrefslogtreecommitdiff
path: root/darcs-all
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-09-13 20:23:30 +0000
committerIan Lynagh <igloo@earth.li>2007-09-13 20:23:30 +0000
commita28ba79a751ec22728e9bdf4184524d72b038339 (patch)
treefe824fc2e70da77c9caa1d841f64be141b14e331 /darcs-all
parentd5938fb228511bfdce45e148ea4906129692e67f (diff)
downloadhaskell-a28ba79a751ec22728e9bdf4184524d72b038339.tar.gz
Give darcs-all a -s (silent) flag
Diffstat (limited to 'darcs-all')
-rw-r--r--darcs-all13
1 files changed, 9 insertions, 4 deletions
diff --git a/darcs-all b/darcs-all
index 7743e8a857..1e773c92f1 100644
--- a/darcs-all
+++ b/darcs-all
@@ -31,7 +31,7 @@ else {
die "Couldn't work out defaultrepo";
}
-my $verbose = 1;
+my $verbose = 2;
my $ignore_failure = 0;
# --extra says we grab the extra libs with 'get'. It has no effect on
@@ -43,13 +43,15 @@ my $nofib = 0;
my $testsuite = 0;
sub message {
- if ($verbose) {
+ if ($verbose >= 2) {
print "@_\n";
}
}
sub warning {
- print "warning: @_\n";
+ if ($verbose >= 1) {
+ print "warning: @_\n";
+ }
}
sub darcs {
@@ -132,6 +134,9 @@ sub main {
# We handle -q here as well as lower down as we need to skip over it
# if it comes before the darcs command
if ($arg eq "-q") {
+ $verbose = 1;
+ }
+ elsif ($arg eq "-s") {
$verbose = 0;
}
elsif ($arg eq "--extra") {
@@ -146,7 +151,7 @@ sub main {
else {
unshift @_, $arg;
if (grep /^-q$/, @_) {
- $verbose = 0;
+ $verbose = 1;
}
last;
}