}
}
-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");
}
for (@tolink) {
- my ($from, $to)= @$_;
+ my ($from, $to) = @$_;
(my $frbase = $from) =~ s#.*/##;
(my $tobase = $to) =~ s#.*/##;
script_alias($installscript, $frbase, $tobase, $scr_ext);