cd `dirname $0`
LENYA_HOME=`pwd -P`

This code works on zones.l.a.o (Solaris 2.10), people.a.o (FreeBSD
6.2), and a Linux server.  I will commit this in the 1.2 and 1.3
branches.  Would somebody else please commit it in trunk?

solprovider

P.S. Here are the results on zones:

FILE: /export/home/lenya/test
#!/bin/sh
echo "PWD= `pwd`"
echo "CMD=$0"
LENYA_HOME=`dirname $0`
echo "DIR=$LENYA_HOME"
cd `dirname $0`
LENYA_HOME=`pwd -P`
echo "LH3=$LENYA_HOME"

$ cd /export/home/lenya
$ ./test
PWD= /export/home/lenya
CMD=./test
DIR=.
LH3=/export/home/lenya
$ cd /opt/local
$ /export/home/lenya/test
PWD= /opt/local
CMD=/export/home/lenya/test
DIR=/export/home/lenya
LH3=/export/home/lenya

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to