From: Jarkko Hietaniemi Date: Thu, 24 May 2001 13:25:04 +0000 (+0000) Subject: Under versiononly install also the scripts with the version suffix. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c8f392da2bce19a4e929f15aae950a6983de61f2;p=p5sagit%2Fp5-mst-13.2.git Under versiononly install also the scripts with the version suffix. (e.g. .../bin/h2xs5.7.1) p4raw-id: //depot/perl@10195 --- diff --git a/installperl b/installperl index 6bfbdc9..9f49c13 100755 --- a/installperl +++ b/installperl @@ -414,11 +414,23 @@ sub script_alias { } } -if (! $versiononly) { - # Install scripts. - - mkpath($installscript, $verbose, 0777); +# Install scripts. +mkpath($installscript, $verbose, 0777); +if ($versiononly) { + for (@scripts) { + (my $base = $_) =~ s#.*/##; + $base .= $ver; + copy($_, "$installscript/$base"); + chmod(0755, "$installscript/$base"); + } + for (@tolink) { + my ($from, $to) = map { "$_$ver" } @$_; + (my $frbase = $from) =~ s#.*/##; + (my $tobase = $to) =~ s#.*/##; + script_alias($installscript, $frbase, $tobase, $scr_ext); + } +} else { for (@scripts) { (my $base = $_) =~ s#.*/##; copy($_, "$installscript/$base"); @@ -426,7 +438,7 @@ if (! $versiononly) { } for (@tolink) { - my ($from, $to)= @$_; + my ($from, $to) = @$_; (my $frbase = $from) =~ s#.*/##; (my $tobase = $to) =~ s#.*/##; script_alias($installscript, $frbase, $tobase, $scr_ext);