summaryrefslogtreecommitdiff
path: root/os2/perl2cmd.pl
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters.nicoh.com>1995-12-26 06:55:30 +0000
committerAndy Dougherty <doughera.lafayette.edu>1995-12-26 06:55:30 +0000
commit82835e01f42cf6e6ec087b39a902865e24e1b401 (patch)
tree07b97c483a008634feaa84e6a4001e712f1d077f /os2/perl2cmd.pl
parent28e44ed9749d8684067f67623a63b70fce87c3b8 (diff)
downloadperl-82835e01f42cf6e6ec087b39a902865e24e1b401.tar.gz
New file.
Diffstat (limited to 'os2/perl2cmd.pl')
-rw-r--r--os2/perl2cmd.pl28
1 files changed, 28 insertions, 0 deletions
diff --git a/os2/perl2cmd.pl b/os2/perl2cmd.pl
new file mode 100644
index 0000000000..215554999a
--- /dev/null
+++ b/os2/perl2cmd.pl
@@ -0,0 +1,28 @@
+# This will put installed perl files into some other location
+# Note that we cannot put hashbang to be extproc to make Configure work.
+
+use Config;
+
+$dir = shift;
+$dir =~ s|/|\\|g ;
+$nowarn = 1, $dir = shift if $dir eq '-n';
+
+die <<EOU unless defined $dir and -d $dir;
+usage: $^X $0 [-n] directory-to-install
+ -n do not check whether the directory is not on path
+EOU
+
+@path = split /;/, $ENV{PATH};
+$idir = $Config{installbin};
+$indir =~ s|\\|/|g ;
+
+foreach $file (<$idir/*.>) {
+ $base = $file;
+ $base =~ s/\.$//; # just in case...
+ $base =~ s|.*/||;
+ $file =~ s|/|\\|g ;
+ print "Processing $file => $dir\\$base.cmd\n";
+ system "echo extproc perl -S > $dir\\$base.cmd";
+ system "type $file >> $dir\\$base.cmd";
+}
+