File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change 33APPDIR=" $( dirname -- " $( readlink -f -- " ${0} " ) " ) "
44
55for LIB in \
6- $APPDIR /java/lib/rt.jar \
7- $APPDIR /java/lib/tools.jar \
8- $APPDIR /lib/* .jar \
6+ " $APPDIR " /java/lib/rt.jar \
7+ " $APPDIR " /java/lib/tools.jar \
8+ " $APPDIR " /lib/* .jar \
99 ;
1010do
1111 CLASSPATH=" ${CLASSPATH} :${LIB} "
@@ -17,18 +17,19 @@ export LD_LIBRARY_PATH
1717
1818export PATH=" ${APPDIR} /java/bin:${PATH} "
1919
20- if [[ " $@ " == * " --upload" * || " $@ " == * " --verify" * || " $@ " == * " --get-pref" * || " $@ " == * " --install-board" * || " $@ " == * " --install-library" * ]] ; then
21- SPLASH=" "
22- else
23- SPLASH=" -splash:$APPDIR /lib/splash.png"
24- fi
25-
2620export JAVA_TOOL_OPTIONS=` echo $JAVA_TOOL_OPTIONS | sed ' s|-javaagent:/usr/share/java/jayatanaag.jar||g' `
2721
2822JAVA=java
29- if [ -x $APPDIR /java/bin/java ]; then
23+ if [ -x " $APPDIR /java/bin/java" ]; then
3024 JAVA=$APPDIR /java/bin/java
3125fi
3226
33- $JAVA -DAPP_DIR=" $APPDIR " -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel $SPLASH processing.app.Base " $@ "
27+ # Collect options to java in an array, to properly handle whitespace in options
28+ JAVA_OPTIONS=(" -DAPP_DIR=$APPDIR " " -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" )
29+
30+ if [[ " $@ " != * " --upload" * && " $@ " != * " --verify" * && " $@ " != * " --get-pref" * && " $@ " != * " --install-board" * && " $@ " != * " --install-library" * ]] ; then
31+ JAVA_OPTIONS+=(" -splash:$APPDIR /lib/splash.png" )
32+ fi
33+
34+ $JAVA " ${JAVA_OPTIONS[@]} " processing.app.Base " $@ "
3435
You can’t perform that action at this time.
0 commit comments