chiark / gitweb /
nailing-cargo: -o alias for --online, -O alias for --offline
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 18 Jun 2020 14:58:50 +0000 (15:58 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 18 Jun 2020 14:58:50 +0000 (15:58 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
nailing-cargo

index d03011180f173b9eb5b11c4e40f6836e8a7bf61f..a4d2d4a177579bc1fd2ba994b9f701291499f70a 100755 (executable)
@@ -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";
       }