chiark / gitweb /
Dgit.pm: Move shell_cmd from dgit
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 20 Jun 2018 15:28:00 +0000 (16:28 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 20 Jun 2018 15:28:00 +0000 (16:28 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Debian/Dgit.pm
dgit

index aec5a23..c0ee27f 100644 (file)
@@ -47,7 +47,7 @@ BEGIN {
                       fail failmsg ensuredir must_getcwd executable_on_path
                       waitstatusmsg failedcmd_waitstatus
                      failedcmd_report_cmd failedcmd
-                      runcmd cmdoutput cmdoutput_errok
+                      runcmd shell_cmd cmdoutput cmdoutput_errok
                       git_rev_parse git_cat_file
                      git_get_ref git_get_symref git_for_each_ref
                       git_for_each_tag_referring is_fast_fwd
@@ -315,6 +315,11 @@ sub runcmd {
     failedcmd @_ if system @_;
 }
 
+sub shell_cmd {
+    my ($first_shell, @cmd) = @_;
+    return qw(sh -ec), $first_shell.'; exec "$@"', 'x', @cmd;
+}
+
 sub cmdoutput_errok {
     confess Dumper(\@_)." ?" if grep { !defined } @_;
     debugcmd "|",@_;
diff --git a/dgit b/dgit
index 94f915e..2cf78ec 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -561,11 +561,6 @@ sub runcmd_ordryrun_local {
     }
 }
 
-sub shell_cmd {
-    my ($first_shell, @cmd) = @_;
-    return qw(sh -ec), $first_shell.'; exec "$@"', 'x', @cmd;
-}
-
 our $helpmsg = <<END;
 main usages:
   dgit [dgit-opts] clone [dgit-opts] package [suite] [./dir|/dir]