File: th.cmd

package info (click to toggle)
pdksh 5.2.14-18
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,884 kB
  • ctags: 2,293
  • sloc: ansic: 24,013; perl: 944; makefile: 606; sh: 304; sed: 40
file content (28 lines) | stat: -rw-r--r-- 485 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
extproc ksh
#
# Simple script to find perl and run it
# for os2

IFS=\;$IFS
perl=
for i in $PATH; do
    [ X"$i" = X ] && i=.
    for j in perl perl5x perl5 ; do
	[ -x $i/$j.exe ] && perl=$i/$j.exe && break 2
    done
done

[ X"$perl" = X ] && {
	echo "$0: can't find perl - bye\n" 1>&2
	exit 1
    }

perlpath=`dirname $perl`
if [ `basename $perlpath` = bin ]
then perlpath=`dirname $perlpath`
fi
if [ "$PERL5LIB" = "" ]
then PERL5LIB=$perlpath/lib
fi
export PERL5LIB
exec $perl "$@"