Please ignore my previous attempt at changing the start script, it will not
work reliably.
After some research, I have worked out and tested the following solution [1] to
deal with absolute or relative symlinks (or no link at all) to XXE's start
script. Please check and confirm that this works on the Mac as well:
--
# Iterate down a (possible) chain of symlinks to locate the script
# in order to determine the distribution directory
scriptFile=$0
cd `dirname $scriptFile`
scriptFile=`basename $scriptFile`
while [ -L "$scriptFile" ]
do
scriptFile=`ls -l "$scriptFile" | awk '{print $(NF)}'`
cd `dirname $scriptFile`
scriptFile=`basename $scriptFile`
done
# Compute the canonicalized name by finding the physical path
# for the directory we're in.
dist=`pwd -P`
--
As stated previously, it would be nice if in one of XXE's next releases, its
start script was enhanced with
the above code for reliably determining the distribution directory, even when
the start script is accessed through a symlink.
Yves
[1] This solution is heavily inspired by http://stackoverflow.com/a/1116890 and
by the suggestion Hussein made yesterday.
--
Dr. Yves Forkl - Softwareentwicklung
SRZ, Bessemerstr. 83-91, 12103 Berlin
www.srz.de | Firmengruppe: www.besscom.de
tel +49 30 75301-335 | fax +49 30 75301-11335
Satz-Rechen-Zentrum Hartmann+Heenemann GmbH&Co. KG
Sitz Berlin | AG Charlottenburg | HRA 8089
Komplementärin Satz-Rechner-Betriebsgesellschaft mbH
Sitz Berlin | AG Charlottenburg | HRB 4905
Geschäftsführer: Walter Fock
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support