diff options
-rw-r--r-- | perl-install/run_program.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm index 293910cb8..8f2f18051 100644 --- a/perl-install/run_program.pm +++ b/perl-install/run_program.pm @@ -7,7 +7,15 @@ use log; 1; -sub run($@) { rooted('', @_) } +sub run_or_die { + my ($name, @args) = @_; + run($name, @args) or die "$name failed\n"; +} +sub rooted_or_die { + my ($root, $name, @args) = @_; + rooted($root, $name, @args) or die "$name failed\n"; +} +sub run { rooted('', @_) } sub rooted { my ($root, $name, @args) = @_; |