source: trunk/third/perl/os2/perl2cmd.pl @ 14545

Revision 14545, 783 bytes checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r14544, which included commits to RCS files with non-trunk default branches.
Line 
1# This will put installed perl files into some other location
2# Note that we cannot put hashbang to be extproc to make Configure work.
3
4use Config;
5
6$dir = shift;
7$dir =~ s|/|\\|g ;
8$nowarn = 1, $dir = shift if $dir eq '-n';
9
10die <<EOU unless defined $dir and -d $dir;
11usage:  $^X $0 [-n] directory-to-install
12  -n    do not check whether the directory is not on path
13EOU
14
15@path = split /;/, $ENV{PATH};
16$idir = $Config{installbin};
17$indir =~ s|\\|/|g ;
18
19foreach $file (<$idir/*>) {
20  next if $file =~ /\.exe/i;
21  $base = $file;
22  $base =~ s/\.$//;             # just in case...
23  $base =~ s|.*/||;
24  $file =~ s|/|\\|g ;
25  print "Processing $file => $dir\\$base.cmd\n";
26  system 'cmd.exe', '/c', "echo extproc perl -S>$dir\\$base.cmd";
27  system 'cmd.exe', '/c', "type $file >> $dir\\$base.cmd";
28}
29
Note: See TracBrowser for help on using the repository browser.