From: Ian Jackson Date: Thu, 18 Jun 2020 14:58:50 +0000 (+0100) Subject: nailing-cargo: -o alias for --online, -O alias for --offline X-Git-Tag: nailing-cargo/1.0.0~179 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=d853cf6dfe15770c1adb77e2223d20ba16291412;p=nailing-cargo.git nailing-cargo: -o alias for --online, -O alias for --offline Signed-off-by: Ian Jackson --- diff --git a/nailing-cargo b/nailing-cargo index d030111..a4d2d4a 100755 --- a/nailing-cargo +++ b/nailing-cargo @@ -79,7 +79,8 @@ # Done automatically when nailing-cargo sees that the cargo # subcommand is one which needs it, eg `fetch'. # -# --online | --offline +# --online | -o +# --offline | -O # Whether to allow cargo to make network access. # (nailing-cargo always passes --offline to cargo, unless # --online is in force). The default is offline, @@ -836,6 +837,8 @@ while (@ARGV && $ARGV[0] =~ m/^-/) { $cargo_manifest_args= $1=~m/[a-z]/; } elsif (s{^-([tT])}{-}) { $cargo_target_arg= $1=~m/[a-z]/; + } elsif (s{^-([oO])}{-}) { + $online= $1=~m/[a-z]/; } else { die "$self: unknown short option(s) $_\n"; }