From 7d0a3e0f39afa19d1613c50b1077252f5968dd23 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 6 May 2020 23:05:29 +0100 Subject: [PATCH] nailing-cargo: Fixes etc. Signed-off-by: Ian Jackson --- nailing-cargo | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/nailing-cargo b/nailing-cargo index afb457d..a094b60 100755 --- a/nailing-cargo +++ b/nailing-cargo @@ -52,7 +52,8 @@ $worksphere =~ s{/[^/]+$}{} or die "$self: cwd \`$worksphere' unsupported!\n"; our $lockfile = "../.nailing-cargo-sphere.lock"; our @configs; -our ($verbose,$noact,$dump); +our $verbose=1; +our ($noact,$dump); sub read_or_enoent ($) { my ($fn) = @_; @@ -153,7 +154,7 @@ our %packagemap; sub read_manifest ($) { my ($subdir) = @_; my $manifest = "../$subdir/Cargo.toml"; - print STDERR "$self: reading $manifest...\n" if $verbose>=3; + print STDERR "$self: reading $manifest...\n" if $verbose>=4; if (defined $manifests{$manifest}) { print STDERR "$self: warning: $subdir: specified more than once!\n"; @@ -264,7 +265,7 @@ sub install () { } rename $use, $mf or die "$self: install nailed $use: $!\n"; unlink_or_enoent $rm or die "$self: remove old $rm: $!\n"; - print STDERR "Nailed $mf\n" if $verbose>=2; + print STDERR "Nailed $mf\n" if $verbose>=3; } } @@ -306,6 +307,8 @@ while (@ARGV && $ARGV[0] =~ m/^-/) { while (m{^-.}) { if (s{^-v}{-}) { $verbose++; + } elsif (s{^-q}{-}) { + $verbose=0; } elsif (s{^-n}{-}) { $noact++; } elsif (s{^-D}{-}) { @@ -339,9 +342,7 @@ install(); my $estatus = invoke(); -print STDERR "INVOKED\n"; uninstall(); -print STDERR "UNINSTALLED\n"; $want_uninstall = 1; exit $estatus; -- 2.30.2