From: Ian Jackson Date: Wed, 6 May 2020 22:05:29 +0000 (+0100) Subject: nailing-cargo: Fixes etc. X-Git-Tag: nailing-cargo/1.0.0~227 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=7d0a3e0f39afa19d1613c50b1077252f5968dd23;p=nailing-cargo.git nailing-cargo: Fixes etc. Signed-off-by: Ian Jackson --- 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;