Adding upstream version 2.25.15.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
parent
10737b110a
commit
b543f2e88d
485 changed files with 191459 additions and 0 deletions
40
lib/Devscripts/Utils.pm
Normal file
40
lib/Devscripts/Utils.pm
Normal file
|
@ -0,0 +1,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;
|
Loading…
Add table
Add a link
Reference in a new issue