https://issues.apache.org/bugzilla/show_bug.cgi?id=21695

--- Comment #3 from Sebb <[email protected]> ---
readlink works OK for absolute soft-links and relative soft-links in the
current directory.

However if a relative soft-link is accessed via the PATH, then the technique
does not work; it will be necessary to convert the relative link to an absolute
one.

Looks like readlink -f does what is wanted; however does it exist on all
Unix-like systems?

If it does, then

java $JVM_ARGS $JMETER_OPTS -jar `dirname $0`/ApacheJMeter.jar "$@"

can simply be changed to

java $JVM_ARGS $JMETER_OPTS -jar `dirname readlink -f $0`/ApacheJMeter.jar "$@"

To allow for spaces in path names, one would need:

java $JVM_ARGS $JMETER_OPTS -jar "`dirname readlink -f $0`/ApacheJMeter.jar"
"$@"

Is "readlink -f" supported on MacOS?

Seems to work OK on FreeBSD and Ubuntu.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to