diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-12-26 14:05:13 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-01-02 12:18:54 +0100 |
commit | ce64b29247b866db41660d85a539aa3482208631 (patch) | |
tree | 14cbfa17c3a9aa067077dd2169a9c9b3ff4186cf /installperl | |
parent | d148da4f615d7b0f2e4d5114a4fb4f1630d8a341 (diff) | |
download | perl-ce64b29247b866db41660d85a539aa3482208631.tar.gz |
In installperl, don't chdir 'lib' before finding files in lib/
Diffstat (limited to 'installperl')
-rwxr-xr-x | installperl | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/installperl b/installperl index af1287a399..5d86a93671 100755 --- a/installperl +++ b/installperl @@ -351,14 +351,12 @@ mkpath($installarchlib, $opts{verbose}, 0777); mkpath($installsitelib, $opts{verbose}, 0777) if ($installsitelib); mkpath($installsitearch, $opts{verbose}, 0777) if ($installsitearch); -if (chdir "lib") { - if ($do_installarchlib || $do_installprivlib) { - find(\&installlib, '.'); - } - chdir ".." || die "Can't cd back to source directory: $!\n"; +if (-d 'lib') { + find(\&installlib, 'lib') + if $do_installarchlib || $do_installprivlib; } else { - warn "Can't cd to lib to install lib files: $!\n"; + warn "Can't install lib files - 'lib/' does not exist"; } # Install header files and libraries. @@ -683,8 +681,8 @@ sub copy { sub installlib { my $dir = $File::Find::dir; - $dir =~ s#^\.(?![^/])/?##; - local($depth) = $dir ? "lib/$dir/" : "lib/"; + $dir =~ s!\Alib/?!!; + local($depth) = $File::Find::dir . '/'; my $name = $_; |