aboutsummaryrefslogtreecommitdiffstats
path: root/iurt_root_command
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-04-15 12:17:07 +0000
committerMichael Scherer <misc@mageia.org>2011-04-15 12:17:07 +0000
commit30ed1a768de606d2c855f6e42d8632911ea916a5 (patch)
tree801f7dcc21a1e1a639344615d3e47baa0c531b73 /iurt_root_command
parent1efd72bc7adbd7087c269a4325afed839d705465 (diff)
downloadiurt-30ed1a768de606d2c855f6e42d8632911ea916a5.tar
iurt-30ed1a768de606d2c855f6e42d8632911ea916a5.tar.gz
iurt-30ed1a768de606d2c855f6e42d8632911ea916a5.tar.bz2
iurt-30ed1a768de606d2c855f6e42d8632911ea916a5.tar.xz
iurt-30ed1a768de606d2c855f6e42d8632911ea916a5.zip
- use File::Path and List::MoreUtils, and only import if_ from MDK::Common
Diffstat (limited to 'iurt_root_command')
-rwxr-xr-xiurt_root_command8
1 files changed, 5 insertions, 3 deletions
diff --git a/iurt_root_command b/iurt_root_command
index 1880e44..57e709e 100755
--- a/iurt_root_command
+++ b/iurt_root_command
@@ -25,10 +25,12 @@ use lib '/usr/local/lib/perl/iurt/lib';
use strict;
my $program_name = 'iurt_root_command';
use Mkcd::Commandline qw(parseCommandLine usage);
-use MDK::Common;
+use MDK::Common qw(if_);
use File::NCopy qw(copy);
use Iurt::Util qw(plog_init plog);
use Cwd 'realpath';
+use File::Path qw(make_path);
+use List::MoreUtils qw(any);
my $arg = @ARGV;
my (@params, %run);
@@ -214,7 +216,7 @@ sub mkdir {
plog('FAIL', "ERROR: $path creation forbidden");
}
if ($opt->{parents}) {
- mkdir_p $path;
+ make_path($path);
} else {
mkdir $path;
}
@@ -383,7 +385,7 @@ sub untar {
plog('FAIL', "untar: options forbidden");
return;
}
- mkdir_p($dir);
+ make_path($dir);
return !system('tar', 'xf', $file, '-C', $dir, @o_files);
}