X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=x2p%2Fs2p.PL;h=70aa03d98dbc115bcee59c2d89471ce31c237215;hb=758f564b3fb5c63b84ce2ab3dd6edc68d23923b7;hp=21a5ee89279d62c1bba94f3c4c4fe856633865c6;hpb=86a59229552fc742ed09795227799fb41537f06f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/x2p/s2p.PL b/x2p/s2p.PL index 21a5ee8..70aa03d 100644 --- a/x2p/s2p.PL +++ b/x2p/s2p.PL @@ -29,8 +29,14 @@ print OUT <<"!GROK!THIS!"; $Config{startperl} eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}' if \$running_under_some_shell; -my \$startperl = "$Config{startperl}"; -my \$perlpath = "$Config{perlpath}"; +my \$startperl; +my \$perlpath; +(\$startperl = <<'/../') =~ s/\\s*\\z//; +$Config{startperl} +/../ +(\$perlpath = <<'/../') =~ s/\\s*\\z//; +$Config{perlpath} +/../ !GROK!THIS! # In the following, perl variables are not expanded during extraction. @@ -48,12 +54,14 @@ use Symbol; =head1 NAME -sed - a stream editor +psed - a stream editor =head1 SYNOPSIS - sed [-an] script [file ...] - sed [-an] [-e script] [-f script-file] [file ...] + psed [-an] script [file ...] + psed [-an] [-e script] [-f script-file] [file ...] + + s2p [-an] [-e script] [-f script-file] =head1 DESCRIPTION @@ -1954,5 +1962,14 @@ way you wish, provided you do not restrict others from doing the same. close OUT or die "Can't close $file: $!"; chmod 0755, $file or die "Can't reset permissions for $file: $!\n"; +unlink 'psed'; +print "Linking s2p to psed.\n"; +if (defined $Config{d_link}) { + link 's2p', 'psed'; +} else { + unshift @INC, '../lib'; + require File::Copy; + File::Copy::syscopy('s2p', 'psed'); +} exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':'; chdir $origdir;