From d853cf6dfe15770c1adb77e2223d20ba16291412 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 18 Jun 2020 15:58:50 +0100 Subject: [PATCH] nailing-cargo: -o alias for --online, -O alias for --offline Signed-off-by: Ian Jackson --- nailing-cargo | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"; } -- 2.30.2