diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/run_program.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm index 78ae48559..4fc9393f6 100644 --- a/perl-install/run_program.pm +++ b/perl-install/run_program.pm @@ -16,6 +16,13 @@ sub rooted_or_die { my ($root, $name, @args) = @_; rooted($root, $name, @args) or die "$name failed\n"; } + +sub get_stdout { + my ($name, @args) = @_; + my @r; + run($name, '>', \@r, @args) or return; + wantarray ? @r : join('', @r); +} sub rooted_get_stdout { my ($root, $name, @args) = @_; my @r; |