summaryrefslogtreecommitdiffstats
path: root/perl-install/commands.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-22 20:07:36 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-22 20:07:36 +0000
commite1922243bd426cc4af43aa806027d3c8e1c2a810 (patch)
treea86284d78d0b3f165d5b224d4cfebcd5a899d55d /perl-install/commands.pm
parent780e03f8220980809fa187aa442978dd2ab7cc33 (diff)
downloaddrakx-backup-do-not-use-e1922243bd426cc4af43aa806027d3c8e1c2a810.tar
drakx-backup-do-not-use-e1922243bd426cc4af43aa806027d3c8e1c2a810.tar.gz
drakx-backup-do-not-use-e1922243bd426cc4af43aa806027d3c8e1c2a810.tar.bz2
drakx-backup-do-not-use-e1922243bd426cc4af43aa806027d3c8e1c2a810.tar.xz
drakx-backup-do-not-use-e1922243bd426cc4af43aa806027d3c8e1c2a810.zip
no_comment
Diffstat (limited to 'perl-install/commands.pm')
-rw-r--r--perl-install/commands.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index 914a4a7be..320488197 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -123,7 +123,7 @@ sub rm {
my $rm; $rm = sub {
foreach (@_) {
- if (-d $_) {
+ if (!-l $_ && -d $_) {
$rec or die "$_ is a directory\n";
&$rm(glob_($_));
rmdir $_ or die "can't remove directory $_: $!\n";
@@ -504,8 +504,8 @@ sub dmesg { print cat_("/tmp/syslog"); }
#my %cached_failed_install_cpio;
#- double space between sub and install_cpio cuz install_cpio is not a shell command
-sub install_cpio($$) {
- my ($dir, $name) = @_;
+sub install_cpio($$;@) {
+ my ($dir, $name, @more) = @_;
# return if $cached_failed_install_cpio{"$dir $name"};
return "$dir/$name" if -e "$dir/$name";
@@ -516,7 +516,9 @@ sub install_cpio($$) {
eval { rm("-r", $dir) };
mkdir $dir, 0755;
require 'run_program.pm';
- run_program::run("cd $dir ; bzip2 -cd $cpio | cpio -id $name $name/*");
+
+ my $more = join " ", map { $_ && "$_ $_/*" } @more;
+ run_program::run("cd $dir ; bzip2 -cd $cpio | cpio -id $name $name/* $more");
#- not found, cache result
# return if $cached_failed_install_cpio{"$dir $name"} = ! -e "$dir/$name";