chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
8d37038
)
break out shell_cmd
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 11 Sep 2013 23:09:25 +0000
(
00:09
+0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 11 Sep 2013 23:09:25 +0000
(
00:09
+0100)
dgit
patch
|
blob
|
history
diff --git
a/dgit
b/dgit
index f77d349b400c344adf13945c6f5e9fd6db3e3b62..9768fe9309870d26e36ebc3fdd2e6f0dbf939974 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-209,6
+209,11
@@
sub runcmd_ordryrun {
}
}
+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]
@@
-660,8
+665,7
@@
sub ensure_we_have_orig () {
$origurl .= "/$f";
die "$f ?" unless $f =~ m/^${package}_/;
die "$f ?" if $f =~ m#/#;
- runcmd_ordryrun qw(sh -ec),'cd ..; exec "$@"','x',
- @dget,'--',$origurl;
+ runcmd_ordryrun shell_cmd 'cd ..', @dget,'--',$origurl;
}
}