summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Debian/Dgit.pm8
-rwxr-xr-xdgit6
-rwxr-xr-xinfra/dgit-repos-server7
3 files changed, 7 insertions, 14 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm
index dcecbd1..5b5591d 100644
--- a/Debian/Dgit.pm
+++ b/Debian/Dgit.pm
@@ -45,7 +45,7 @@ BEGIN {
fail ensuredir executable_on_path
waitstatusmsg failedcmd_waitstatus
failedcmd_report_cmd failedcmd
- cmdoutput cmdoutput_errok
+ runcmd cmdoutput cmdoutput_errok
git_rev_parse git_cat_file
git_get_ref git_for_each_ref
git_for_each_tag_referring is_fast_fwd
@@ -276,6 +276,12 @@ sub failedcmd {
fail failedcmd_waitstatus();
}
+sub runcmd {
+ debugcmd "+",@_;
+ $!=0; $?=-1;
+ failedcmd @_ if system @_;
+}
+
sub cmdoutput_errok {
confess Dumper(\@_)." ?" if grep { !defined } @_;
debugcmd "|",@_;
diff --git a/dgit b/dgit
index 9c7ec73..54ba4d6 100755
--- a/dgit
+++ b/dgit
@@ -493,12 +493,6 @@ sub url_get {
our ($dscdata,$dscurl,$dsc,$dsc_checked,$skew_warning_vsn);
-sub runcmd {
- debugcmd "+",@_;
- $!=0; $?=-1;
- failedcmd @_ if system @_;
-}
-
sub act_local () { return $dryrun_level <= 1; }
sub act_scary () { return !$dryrun_level; }
diff --git a/infra/dgit-repos-server b/infra/dgit-repos-server
index ec9b2c9..a8b9400 100755
--- a/infra/dgit-repos-server
+++ b/infra/dgit-repos-server
@@ -303,13 +303,6 @@ sub reject ($) {
die "\ndgit-repos-server: reject: $why\n\n";
}
-sub runcmd {
- debugcmd '+',@_;
- $!=0; $?=0;
- my $r = system @_;
- die (shellquote @_)." $? $!" if $r;
-}
-
sub policyhook {
my ($policyallowbits, @polargs) = @_;
# => ($exitstatuspolicybitmap);