1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
package Devscripts::Utils;
use strict;
use Devscripts::Output;
use Dpkg::IPC;
use Exporter 'import';
our @EXPORT = qw(ds_exec ds_exec_no_fail);
sub ds_exec_no_fail {
{
local $, = ' ';
ds_debug "Execute: @_...";
}
spawn(
exec => [@_],
to_file => '/dev/null',
wait_child => 1,
nocheck => 1,
);
return $?;
}
sub ds_exec {
{
local $, = ' ';
ds_debug "Execute: @_...";
}
spawn(
exec => [@_],
wait_child => 1,
nocheck => 1,
);
if ($?) {
local $, = ' ';
ds_die "Command failed (@_)";
}
}
1;
|