mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
includes new Rhino .jar to allow module directories to be specified as paths: https://github.com/jsdoc3/rhino/tree/5dd82a4c
34 lines
1.1 KiB
Bash
Executable File
34 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
SOURCE="$0"
|
|
while [ -h "$SOURCE" ] ; do
|
|
NEXTSOURCE="$(readlink "$SOURCE")"
|
|
echo $NEXTSOURCE | grep -q -e "^/"
|
|
if [ $? = 0 ]; then
|
|
SOURCE="$NEXTSOURCE"
|
|
else
|
|
SOURCE="$(dirname $SOURCE)/$NEXTSOURCE"
|
|
fi
|
|
done
|
|
# Get a Windows path under MinGW or Cygwin
|
|
BASEPATH="$( cd -P "$( dirname "$SOURCE" )" && (pwd -W 2>/dev/null || cygpath -w $(pwd) 2>/dev/null || pwd))"
|
|
if [ "${BASEPATH%${BASEPATH#?}}" != "/" ] ; then
|
|
BASEPATH="$( echo "$BASEPATH" | sed -e 's@\\@/@g' )"
|
|
fi
|
|
|
|
if test "$1" = "--debug"
|
|
then
|
|
CMD="org.mozilla.javascript.tools.debugger.Main -debug -opt -1"
|
|
else
|
|
CMD="org.mozilla.javascript.tools.shell.Main"
|
|
fi
|
|
|
|
if test "$1" = "-T"
|
|
then
|
|
cd -P "$(dirname "$SOURCE")"
|
|
java -classpath "${BASEPATH}/rhino/js.jar" ${CMD} -opt -1 -modules "${BASEPATH}/lib" -modules "${BASEPATH}/node_modules" -modules "${BASEPATH}/rhino" -modules "${BASEPATH}" "${BASEPATH}/jsdoc.js" "$@"
|
|
|
|
else
|
|
java -classpath "${BASEPATH}/rhino/js.jar" ${CMD} -modules "${BASEPATH}/lib" -modules "${BASEPATH}/node_modules" -modules "${BASEPATH}/rhino" -modules "${BASEPATH}" "${BASEPATH}/jsdoc.js" "$@"
|
|
fi
|