1 | #!/bin/sh
|
---|
2 | # This file is part of the DITA Open Toolkit project hosted on
|
---|
3 | # Sourceforge.net. See the accompanying license.txt file for
|
---|
4 | # applicable licenses.
|
---|
5 | # (c) Copyright IBM Corp. 2006 All Rights Reserved.
|
---|
6 |
|
---|
7 | realpath() {
|
---|
8 | case $1 in
|
---|
9 | /*) echo "$1" ;;
|
---|
10 | *) echo "$PWD/${1#./}" ;;
|
---|
11 | esac
|
---|
12 | }
|
---|
13 |
|
---|
14 | if [ "${DITA_HOME:+1}" = "1" ] && [ -e "$DITA_HOME" ]; then
|
---|
15 | export DITA_DIR="$(realpath "$DITA_HOME")"
|
---|
16 | else #elif [ "${DITA_HOME:+1}" != "1" ]; then
|
---|
17 | export DITA_DIR="$(dirname "$(realpath "$0")")"
|
---|
18 | fi
|
---|
19 |
|
---|
20 | if [ -f "$DITA_DIR"/tools/ant/bin/ant ] && [ ! -x "$DITA_DIR"/tools/ant/bin/ant ]; then
|
---|
21 | chmod +x "$DITA_DIR"/tools/ant/bin/ant
|
---|
22 | fi
|
---|
23 |
|
---|
24 | export ANT_OPTS="-Xmx512m $ANT_OPTS"
|
---|
25 | export ANT_OPTS="$ANT_OPTS -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl"
|
---|
26 | export ANT_HOME="$DITA_DIR"/tools/ant
|
---|
27 | export PATH="$DITA_DIR"/tools/ant/bin:"$PATH"
|
---|
28 |
|
---|
29 | NEW_CLASSPATH="$DITA_DIR/lib/dost.jar"
|
---|
30 | NEW_CLASSPATH="$DITA_DIR/lib:$NEW_CLASSPATH"
|
---|
31 | NEW_CLASSPATH="$DITA_DIR/lib/commons-codec-1.4.jar:$NEW_CLASSPATH"
|
---|
32 | NEW_CLASSPATH="$DITA_DIR/lib/resolver.jar:$NEW_CLASSPATH"
|
---|
33 | NEW_CLASSPATH="$DITA_DIR/lib/icu4j.jar:$NEW_CLASSPATH"
|
---|
34 | NEW_CLASSPATH="$DITA_DIR/lib/xercesImpl.jar:$NEW_CLASSPATH"
|
---|
35 | NEW_CLASSPATH="$DITA_DIR/lib/xml-apis.jar:$NEW_CLASSPATH"
|
---|
36 | NEW_CLASSPATH="$DITA_DIR/lib/saxon/saxon9.jar:$NEW_CLASSPATH"
|
---|
37 | NEW_CLASSPATH="$DITA_DIR/lib/saxon/saxon9-dom.jar:$NEW_CLASSPATH"
|
---|
38 | if test -n "$CLASSPATH"; then
|
---|
39 | export CLASSPATH="$NEW_CLASSPATH":"$CLASSPATH"
|
---|
40 | else
|
---|
41 | export CLASSPATH="$NEW_CLASSPATH"
|
---|
42 | fi
|
---|
43 |
|
---|
44 | cd "$DITA_DIR"
|
---|
45 | "$SHELL"
|
---|