Created
January 12, 2014 14:45
-
-
Save infotexture/8385424 to your computer and use it in GitHub Desktop.
DITA Open Toolkit `startcmd.sh` (as shipped with v1.7.1 to v1.8)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This file is part of the DITA Open Toolkit project hosted on | |
# Sourceforge.net. See the accompanying license.txt file for | |
# applicable licenses. | |
# (c) Copyright IBM Corp. 2006 All Rights Reserved. | |
realpath() { | |
case $1 in | |
/*) echo "$1" ;; | |
*) echo "$PWD/${1#./}" ;; | |
esac | |
} | |
if [ "${DITA_HOME:+1}" = "1" ] && [ -e "$DITA_HOME" ]; then | |
export DITA_DIR="$(realpath "$DITA_HOME")" | |
else #elif [ "${DITA_HOME:+1}" != "1" ]; then | |
export DITA_DIR="$(dirname "$(realpath "$0")")" | |
fi | |
if [ -f "$DITA_DIR"/tools/ant/bin/ant ] && [ ! -x "$DITA_DIR"/tools/ant/bin/ant ]; then | |
chmod +x "$DITA_DIR"/tools/ant/bin/ant | |
fi | |
export ANT_OPTS="-Xmx512m $ANT_OPTS" | |
export ANT_OPTS="$ANT_OPTS -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl" | |
export ANT_HOME="$DITA_DIR"/tools/ant | |
export PATH="$DITA_DIR"/tools/ant/bin:"$PATH" | |
NEW_CLASSPATH="$DITA_DIR/lib/dost.jar" | |
NEW_CLASSPATH="$DITA_DIR/lib:$NEW_CLASSPATH" | |
NEW_CLASSPATH="$DITA_DIR/lib/commons-codec-1.4.jar:$NEW_CLASSPATH" | |
NEW_CLASSPATH="$DITA_DIR/lib/resolver.jar:$NEW_CLASSPATH" | |
NEW_CLASSPATH="$DITA_DIR/lib/icu4j.jar:$NEW_CLASSPATH" | |
NEW_CLASSPATH="$DITA_DIR/lib/xercesImpl.jar:$NEW_CLASSPATH" | |
NEW_CLASSPATH="$DITA_DIR/lib/xml-apis.jar:$NEW_CLASSPATH" | |
NEW_CLASSPATH="$DITA_DIR/lib/saxon/saxon9.jar:$NEW_CLASSPATH" | |
NEW_CLASSPATH="$DITA_DIR/lib/saxon/saxon9-dom.jar:$NEW_CLASSPATH" | |
if test -n "$CLASSPATH"; then | |
export CLASSPATH="$NEW_CLASSPATH":"$CLASSPATH" | |
else | |
export CLASSPATH="$NEW_CLASSPATH" | |
fi | |
cd "$DITA_DIR" | |
"$SHELL" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment