chiark / gitweb /
Usage message: Mention --edits-sources
[nailing-cargo.git] / nailing-cargo
index 32fcaf2ab49dd85648b12e943a2fcb1648ebf853..bc0114e8096581e9beb617d02903e515b96c809e 100755 (executable)
@@ -27,8 +27,10 @@ options:
   -h --help                       Print this message
   --doc --man --manual            Display complete manual (in w3m)
   --leave-nailed                  Leave the nailed Cargo.toml in place
+  -E | --edits-sources            Allow source edits
+  --linkfarm[=no|shallow|git|full]        (default varies, usually "no")
   --just-linkfarm | --clean-linkfarm | --keep-linkfarm (default is keep)
-  --[no-]preclean-linkfarm[=no|src|full]               (default is no)
+  --[no-]preclean-build[=no|src|full]               (default is no)
   --just-run                      Run the command, don't do cargo stuff
   --no-nail                       Do not nail, just run the command.
   --no-cargo-lock-manip           Do not manipulate Cargo.lock.
@@ -982,6 +984,10 @@ sub parse_args () {
     $not_a_nailing_opt->() unless m{^-};
     $not_a_nailing_opt->() if $_ eq '--';
 
+    my $edits_sources = sub {
+      $linkfarm_depth = 'copy-edit';
+    };
+
     if ($_ eq '---') { # usage 2 or 3
       if (!@ARGV) {
        die "$self: --- must be followed by build command\n" unless $noact;
@@ -1018,7 +1024,7 @@ sub parse_args () {
        } elsif (s{^-D}{-}) {
          $dump++;
        } elsif (s{^-E}{-}) {
-         $linkfarm_depth = 'copy-edit';
+         $edits_sources->();
        } elsif (s{^-T(.+)}{-}s) {
          $target = $1;
        } elsif (s{^-([oO])}{-}) {
@@ -1043,7 +1049,7 @@ sub parse_args () {
     } elsif (m{^--linkfarm(?:=(no|shallow|git|full))?$}) {
       $linkfarm_depth = $1 || 'git';
     } elsif (m{^--edits?-sources?$}) {
-      $linkfarm_depth = 'copy-edit';
+      $edits_sources->();
     } elsif (m{^--just-run$}) {
       $do_nail = $do_cargo_lock = $do_lock = 0;
     } elsif (m{^--(clean|keep)-linkfarm$}) {
@@ -1133,7 +1139,9 @@ if ($dump) {
                           subdir => $subdir,
                           oot_dir => $oot_dir,
                           oot_absdir => $oot_absdir,
-                          build_absdir => $build_absdir });
+                          build_absdir => $build_absdir,
+                          linkfarm_depth => $linkfarm_depth,
+                          oot_preclean => $oot_preclean, });
   ' or die $@;
 }