summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2013-08-13 20:56:16 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2013-08-13 20:56:16 +0100
commit7969c5b08add442b930ac674ad8dc1607b2063c5 (patch)
treea6d3b2fafc0c28d05c3fd71c20554be8da883d05
parent9caea34ec7bc7cba966b8a5662e0297a4c2d1736 (diff)
promote cmdoutput nfc
-rwxr-xr-xdgit32
1 files changed, 16 insertions, 16 deletions
diff --git a/dgit b/dgit
index 4491c96..fef71e5 100755
--- a/dgit
+++ b/dgit
@@ -42,6 +42,22 @@ sub url_get {
our ($dscdata,$dscurl,$dsc);
+sub runcmd {
+ $!=0; $?=0;
+ die "@_ $! $?" if system @_;
+}
+
+sub cmdoutput {
+ open P, "-|", @_ or die $!;
+ my $d;
+ $!=0; $?=0;
+ { local $/ = undef; $d = <P>; }
+ die if P->error;
+ close P or die "@_ $? $!";
+ chomp $d;
+ return $d;
+}
+
sub parsecontrol {
my $c = Dpkg::Control::Hash->new();
$c->load(@_) or return undef;
@@ -87,22 +103,6 @@ sub check_for_git () {
return $r+0;
}
-sub runcmd {
- $!=0; $?=0;
- die "@_ $! $?" if system @_;
-}
-
-sub cmdoutput {
- open P, "-|", @_ or die $!;
- my $d;
- $!=0; $?=0;
- { local $/ = undef; $d = <P>; }
- die if P->error;
- close P or die "@_ $? $!";
- chomp $d;
- return $d;
-}
-
our ($dsc_hash,$lastupl_hash);
sub generate_commit_from_dsc () {