-
Notifications
You must be signed in to change notification settings - Fork 13
/
startcmd.sh
executable file
·45 lines (39 loc) · 1.48 KB
/
startcmd.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
# This file is part of the DITA Open Toolkit project.
# See the accompanying license.txt file for applicable licenses.
# (c) Copyright IBM Corp. 2006 All Rights Reserved.
echo "NOTE: The startcmd.sh has been deprecated, use the 'dita' command instead."
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"/bin/ant ] && [ ! -x "$DITA_DIR"/bin/ant ]; then
chmod +x "$DITA_DIR"/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"
export PATH="$DITA_DIR"/bin:"$PATH"
NEW_CLASSPATH="$DITA_DIR/lib/dost.jar"
NEW_CLASSPATH="$DITA_DIR/lib:$NEW_CLASSPATH"
NEW_CLASSPATH="$DITA_DIR/lib/commons-codec.jar:$NEW_CLASSPATH"
NEW_CLASSPATH="$DITA_DIR/lib/xml-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.jar:$NEW_CLASSPATH"
NEW_CLASSPATH="$DITA_DIR/lib/saxon-dom.jar:$NEW_CLASSPATH"
if test -n "$CLASSPATH"; then
export CLASSPATH="$NEW_CLASSPATH":"$CLASSPATH"
else
export CLASSPATH="$NEW_CLASSPATH"
fi
cd "$DITA_DIR"
"$SHELL"