diff options
author | Perl 5 Porters <perl5-porters.nicoh.com> | 1995-12-26 06:55:30 +0000 |
---|---|---|
committer | Andy Dougherty <doughera.lafayette.edu> | 1995-12-26 06:55:30 +0000 |
commit | 82835e01f42cf6e6ec087b39a902865e24e1b401 (patch) | |
tree | 07b97c483a008634feaa84e6a4001e712f1d077f /os2/perl2cmd.pl | |
parent | 28e44ed9749d8684067f67623a63b70fce87c3b8 (diff) | |
download | perl-82835e01f42cf6e6ec087b39a902865e24e1b401.tar.gz |
New file.
Diffstat (limited to 'os2/perl2cmd.pl')
-rw-r--r-- | os2/perl2cmd.pl | 28 |
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"; +} + |