-
Patch
-
Resolution: Done
-
Minor
-
6.0.0.CR1
-
None
-
Low
I was working on packagin JBoss AS into homebrew (Mac OS packaging system) and found a limitation in our command scripts.
They assume that the script has not been symlinked and hence fail to find the right jars upon symlinked scripts.
Basically, they do
DIRNAME=`dirname $0` PROGNAME=`basename $0`
and should do
# Extract the directory and the program name # takes care of symlinks PRG="$0" while [ -h "$PRG" ] ; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG="`dirname "$PRG"`/$link" fi done DIRNAME=`dirname "$PRG"` PROGNAME=`basename "$PRG"`