X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=installperl;h=c35482db939e71ce4cb23f1e793d064f8fab21dd;hb=0ecd3ba2f9cc10124e1b1548816d989cfc59a802;hp=ae55ff3f483dd86979c09b74e6e6620d8c0dbef5;hpb=b962b4faa5c1d38e1b3dee493c58991ae48cefe9;p=p5sagit%2Fp5-mst-13.2.git diff --git a/installperl b/installperl index ae55ff3..c35482d 100755 --- a/installperl +++ b/installperl @@ -393,6 +393,19 @@ if (! $versiononly && (-f 'cppstdin') && (! samepath($installbin, '.'))) { chmod(0755, "$installbin/cppstdin"); } +sub script_alias { + my ($installscript, $orig, $alias, $scr_ext) = @_; + + safe_unlink("$installscript/pstruct$scr_ext"); + if ($^O eq 'dos' or $Is_VMS or $^O eq 'transit') { + copy("$installscript/$orig$scr_ext", + "$installscript/$alias$scr_ext"); + } else { + link("$installscript/$orig$scr_ext", + "$installscript/$alias$scr_ext"); + } +} + if (! $versiononly) { # Install scripts. @@ -405,14 +418,10 @@ if (! $versiononly) { } # pstruct should be a link to c2ph - safe_unlink("$installscript/pstruct$scr_ext"); - if ($^O eq 'dos' or $Is_VMS or $^O eq 'transit') { - copy("$installscript/c2ph$scr_ext", - "$installscript/pstruct$scr_ext"); - } else { - link("$installscript/c2ph$scr_ext", - "$installscript/pstruct$scr_ext"); - } + script_alias('c2ph', 'pstruct'); + + # psed should be a link to s2p + script_alias('s2p', 'psed'); } # Install pod pages. Where? I guess in $installprivlib/pod @@ -498,7 +507,7 @@ sub yn { my($prompt) = @_; my($answer); my($default) = $prompt =~ m/\[([yn])\]\s*$/i; - warn $prompt; + print STDERR $prompt; chop($answer = ); $answer = $default if $answer =~ m/^\s*$/; ($answer =~ m/^[yY]/);