1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Linux: startup script was using dropped --curdir param. Fixed

This commit is contained in:
Federico Fissore 2015-06-30 09:07:02 +02:00
parent eff3b6b5f3
commit 7c91cbaf55

View File

@ -1,21 +1,18 @@
#!/usr/bin/env bash
CURDIR=`pwd`
APPDIR="$(dirname -- "$(readlink -f -- "${0}")" )"
cd "$APPDIR"
for LIB in \
java/lib/rt.jar \
java/lib/tools.jar \
lib/*.jar \
$APPDIR/java/lib/rt.jar \
$APPDIR/java/lib/tools.jar \
$APPDIR/lib/*.jar \
;
do
CLASSPATH="${CLASSPATH}:${LIB}"
done
export CLASSPATH
LD_LIBRARY_PATH=`pwd`/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
LD_LIBRARY_PATH=$APPDIR/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
export PATH="${APPDIR}/java/bin:${PATH}"
@ -23,15 +20,15 @@ export PATH="${APPDIR}/java/bin:${PATH}"
if [[ "$@" == *"--upload"* || "$@" == *"--verify"* || "$@" == *"--get-pref"* || "$@" == *"--install-board"* || "$@" == *"--install-library"* ]] ; then
SPLASH=""
else
SPLASH="-splash:./lib/splash.png"
SPLASH="-splash:$APPDIR/lib/splash.png"
fi
export JAVA_TOOL_OPTIONS=`echo $JAVA_TOOL_OPTIONS | sed 's|-javaagent:/usr/share/java/jayatanaag.jar||g'`
JAVA=java
if [ -x ./java/bin/java ]; then
JAVA=./java/bin/java
if [ -x $APPDIR/java/bin/java ]; then
JAVA=$APPDIR/java/bin/java
fi
$JAVA -DAPP_DIR="$APPDIR" -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel $SPLASH processing.app.Base --curdir "$CURDIR" "$@"
$JAVA -DAPP_DIR="$APPDIR" -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel $SPLASH processing.app.Base "$@"