kopia lustrzana https://github.com/maccasoft/z80-tools
32 wiersze
751 B
Plaintext
32 wiersze
751 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
|
||
|
APPDIR="$(dirname -- "$(readlink -f -- "${0}")" )"
|
||
|
|
||
|
for LIB in \
|
||
|
"$APPDIR"/java/lib/rt.jar \
|
||
|
"$APPDIR"/java/lib/tools.jar \
|
||
|
"$APPDIR"/lib/*.jar \
|
||
|
;
|
||
|
do
|
||
|
CLASSPATH="${CLASSPATH}:${LIB}"
|
||
|
done
|
||
|
export CLASSPATH
|
||
|
|
||
|
LD_LIBRARY_PATH=$APPDIR/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
||
|
export LD_LIBRARY_PATH
|
||
|
|
||
|
export PATH="${APPDIR}/java/bin:${PATH}"
|
||
|
|
||
|
export JAVA_TOOL_OPTIONS=`echo $JAVA_TOOL_OPTIONS | sed 's|-javaagent:/usr/share/java/jayatanaag.jar||g'`
|
||
|
|
||
|
JAVA=java
|
||
|
if [ -x "$APPDIR/java/bin/java" ]; then
|
||
|
JAVA=$APPDIR/java/bin/java
|
||
|
fi
|
||
|
|
||
|
# Collect options to java in an array, to properly handle whitespace in options
|
||
|
JAVA_OPTIONS=("-DAPP_DIR=$APPDIR")
|
||
|
|
||
|
"$JAVA" "${JAVA_OPTIONS[@]}" com.maccasoft.tools.Application "$@"
|
||
|
|