From 83d3b8a8b8d49b8d46f0e93311faba1c88bee8ee Mon Sep 17 00:00:00 2001 From: benfry Date: Wed, 22 Mar 2006 00:11:56 +0000 Subject: [PATCH] fix for script issues with folders that have a space in the name --- build/linux/dist/processing | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/build/linux/dist/processing b/build/linux/dist/processing index 076f67563..05afbdb12 100755 --- a/build/linux/dist/processing +++ b/build/linux/dist/processing @@ -1,21 +1,34 @@ #!/bin/sh +APPDIR=$(dirname "$0") + +# as of 0109, now using all relative paths and doing a cd to the +# processing folder on run, because there are too many dependencies +# in the folder. using $APPDIR as a prefix for all these things can +# help, but doesn't work in cases where there are spaces in the name +# of the folder that contains processing itself. + CLASSPATH=java/lib/rt.jar:lib:lib/build:lib/pde.jar:lib/core.jar:lib/antlr.jar:lib/oro.jar:lib/registry.jar:lib/mrj.jar export CLASSPATH -# put the directory where this file lives in the front of the path, because -# that directory also contains jikes, which we will need at runtime. +# put the directory where this file lives in the front of the path, +# because that directory also contains jikes, which we will need at runtime. # -PATH=`pwd`/`dirname $0`:`pwd`/java/bin:${PATH} +#PATH=`pwd`/`dirname $0`:`pwd`/java/bin:${PATH} +#PATH=$APPDIR:$APPDIR/java/bin:${PATH} +#echo $PATH +PATH=.:java/bin:${PATH} export PATH # test to see if jikes is operable. i'm a crappy bash scripter # so if someone knows a more elegant way to do this, let me know. # -jikes -version 1> /dev/null 2> /dev/null +#echo $APPDIR/jikes +"$APPDIR/jikes" -version 1> /dev/null 2> /dev/null if [ $? == 0 ] then - java processing.app.Base + # need to cd to the dir because subfolders like lib et al need to be ready + cd "$APPDIR" && java processing.app.Base else echo echo It appears that the version of Jikes distributed with Processing