summaryrefslogtreecommitdiff
path: root/installperl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-12-26 14:05:13 +0100
committerNicholas Clark <nick@ccl4.org>2012-01-02 12:18:54 +0100
commitce64b29247b866db41660d85a539aa3482208631 (patch)
tree14cbfa17c3a9aa067077dd2169a9c9b3ff4186cf /installperl
parentd148da4f615d7b0f2e4d5114a4fb4f1630d8a341 (diff)
downloadperl-ce64b29247b866db41660d85a539aa3482208631.tar.gz
In installperl, don't chdir 'lib' before finding files in lib/
Diffstat (limited to 'installperl')
-rwxr-xr-xinstallperl14
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 = $_;