summaryrefslogtreecommitdiff
path: root/installperl
diff options
context:
space:
mode:
authorLarry Wall <lwall@netlabs.com>1991-11-05 06:28:23 +0000
committerLarry Wall <lwall@netlabs.com>1991-11-05 06:28:23 +0000
commit45d8adaa83210dbf286f70ae01d99f534e6c8052 (patch)
treefe8eafd2432c8a10e92f9f6e093936c682c83b63 /installperl
parent99b89507a1fb507cf2635775ed834be00409c207 (diff)
downloadperl-45d8adaa83210dbf286f70ae01d99f534e6c8052.tar.gz
perl 4.0 patch 15: patch #11, continued
See patch #11.
Diffstat (limited to 'installperl')
-rw-r--r--installperl38
1 files changed, 26 insertions, 12 deletions
diff --git a/installperl b/installperl
index 633ff266a1..e05e75ce59 100644
--- a/installperl
+++ b/installperl
@@ -6,7 +6,9 @@ while (@ARGV) {
shift;
}
-@scripts = ('h2ph', 'x2p/s2p', 'x2p/find2perl');
+umask 022;
+
+@scripts = ('cppstdin', 'h2ph', 'c2ph', 'pstruct', 'x2p/s2p', 'x2p/find2perl');
@manpages = ('perl.man', 'h2ph.man', 'x2p/a2p.man', 'x2p/s2p.man');
$version = sprintf("%5.3f", $]);
@@ -85,7 +87,7 @@ if ($bdev != $ddev || $bino != $dino) {
($udev,$uino) = stat("/usr/bin");
if (-w _ && ($udev != $ddev || $uino != $dino) && !$nonono) {
- unlink "/usr/bin/perl";
+ &unlink("/usr/bin/perl");
eval 'symlink("$installbin/perl", "/usr/bin/perl")' ||
eval 'link("$installbin/perl", "/usr/bin/perl")' ||
&cmd("cp $installbin/perl /usr/bin");
@@ -100,16 +102,6 @@ for (@scripts) {
s#.*/##; &chmod(0755, "$installscr/$_");
}
-# Install library files.
-
-&makedir($installprivlib);
-
-($pdev,$pino) = stat($installprivlib);
-
-if ($pdev != $ddev || $pino != $dino) {
- &cmd("cd lib && cp *.pl $installprivlib");
-}
-
# Install man pages.
if ($mansrc ne '') {
@@ -134,6 +126,28 @@ if ($mansrc ne '') {
}
}
+# Install library files.
+
+&makedir($installprivlib);
+if (chdir "lib") {
+
+ ($pdev,$pino) = stat($installprivlib);
+ ($ldev,$lino) = stat('.');
+
+ if ($pdev != $ldev || $pino != $lino) {
+ foreach $file (<*.pl>) {
+ &unlink("$installprivlib/$file");
+ &cmd("cp $file $installprivlib");
+ }
+ }
+ chdir ".." || die "Can't cd back to source directory: $!\n";
+}
+else {
+ warn "Can't cd to lib to install lib files: $!\n";
+}
+
+&chmod(0755, "usub/mus");
+
print STDERR " Installation complete\n";
exit 0;