diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-05-19 11:58:30 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-05-19 11:58:30 +0000 |
commit | 2227e2d5ffcdf072881094a254a6a548f18569a0 (patch) | |
tree | 4099a779a10fab8e36071ba9cc4eefa758ad4324 /installperl | |
parent | a8f3d2d7ed00cb21068163f255a8a6311031e11f (diff) | |
download | perl-2227e2d5ffcdf072881094a254a6a548f18569a0.tar.gz |
Change 33859 missed $destdir => $opts{destdir}
p4raw-id: //depot/perl@33861
Diffstat (limited to 'installperl')
-rwxr-xr-x | installperl | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/installperl b/installperl index 4196d173fa..03ff495041 100755 --- a/installperl +++ b/installperl @@ -98,7 +98,6 @@ if ( $Is_VMS ) { } $otherperls = 1; -my $destdir = ''; while (@ARGV) { $opts{notify} = 1 if $ARGV[0] eq '-n'; $dostrip = 1 if $ARGV[0] eq '-s'; @@ -111,7 +110,7 @@ while (@ARGV) { $archname = 1 if $ARGV[0] eq '-A'; $nwinstall = 1 if $ARGV[0] eq '-netware'; $nopods = 1 if $ARGV[0] eq '-p'; - $destdir = $1 if $ARGV[0] =~ /^-?-destdir=(.*)$/; + $opts{destdir} = $1 if $ARGV[0] =~ /^-?-destdir=(.*)$/; if ($ARGV[0] eq '-?' or $ARGV[0] =~ /^-?-h/) { print <<"EOT"; Usage $0: [switches] @@ -206,13 +205,13 @@ die "Patchlevel of perl ($patchlevel)", if $patchlevel != $Config{'PERL_VERSION'}; # Fetch some frequently-used items from %Config -my $installbin = "$destdir$Config{installbin}"; -my $installscript = "$destdir$Config{installscript}"; -my $installprivlib = "$destdir$Config{installprivlib}"; -my $installarchlib = "$destdir$Config{installarchlib}"; -my $installsitelib = "$destdir$Config{installsitelib}"; -my $installsitearch = "$destdir$Config{installsitearch}"; -my $installman1dir = "$destdir$Config{installman1dir}"; +my $installbin = "$opts{destdir}$Config{installbin}"; +my $installscript = "$opts{destdir}$Config{installscript}"; +my $installprivlib = "$opts{destdir}$Config{installprivlib}"; +my $installarchlib = "$opts{destdir}$Config{installarchlib}"; +my $installsitelib = "$opts{destdir}$Config{installsitelib}"; +my $installsitearch = "$opts{destdir}$Config{installsitearch}"; +my $installman1dir = "$opts{destdir}$Config{installman1dir}"; my $man1ext = $Config{man1ext}; my $libperl = $Config{libperl}; # Shared library and dynamic loading suffixes. @@ -709,9 +708,9 @@ sub link { my($success) = 0; my $xfrom = $from; - $xfrom =~ s/^\Q$destdir\E// if $destdir; + $xfrom =~ s/^\Q$opts{destdir}\E// if $opts{destdir}; my $xto = $to; - $xto =~ s/^\Q$destdir\E// if $destdir; + $xto =~ s/^\Q$opts{destdir}\E// if $opts{destdir}; print $opts{verbose} ? " ln $xfrom $xto\n" : " $xto\n" unless $opts{silent}; eval { @@ -754,7 +753,7 @@ sub copy { my($from,$to) = @_; my $xto = $to; - $xto =~ s/^\Q$destdir\E// if $destdir; + $xto =~ s/^\Q$opts{destdir}\E// if $opts{destdir}; print $opts{verbose} ? " cp $from $xto\n" : " $xto\n" unless $opts{silent}; print " creating new version of $xto\n" @@ -855,7 +854,7 @@ sub installlib { unlink("$installarchlib/$name"); } my $xname = "$installlib/$name"; - $xname =~ s/^\Q$destdir\E// if $destdir; + $xname =~ s/^\Q$opts{destdir}\E// if $opts{destdir}; $packlist->{$xname} = { type => 'file' }; if ($force || compare($_, "$installlib/$name") || $opts{notify}) { unlink("$installlib/$name"); @@ -902,7 +901,7 @@ sub copy_if_diff { my($from,$to)=@_; return 1 if (($^O eq 'VMS') && (-d $from)); my $xto = $to; - $xto =~ s/^\Q$destdir\E// if $destdir; + $xto =~ s/^\Q$opts{destdir}\E// if $opts{destdir}; my $perlpodbadsymlink; if ($from =~ m!^pod/perl[\w-]+\.pod$! && -l $from && |