configure script help

cfleck

tired
i have an app i'm trying to install and it looks for my java install in places i dont have it. i'm trying to edit the script to set my java path manually. problem is, it sets the path in a way i am not familiar. can someone tell me what is going on here...

# set JAVA
[ x${JAVA} = x ] &&
[ -f ${JAVA_HOME}/bin/java ] && JAVA=${JAVA_HOME}/bin/java

[ x${JAVA} = x ] &&
[ -f ${JAVA_HOME}/bin/java.exe ] && JAVA=${JAVA_HOME}/bin/java.exe

[ x${JAVA} = x ] &&
[ -f ${GATE_HOME}/jre1.4/bin/java ] && JAVA=${GATE_HOME}/jre1.4/bin/java

[ x${JAVA} = x ] &&
[ -f ${GATE_HOME}/jre1.4/bin/java.exe ] && JAVA=${GATE_HOME}/jre1.4/bin/java.exe

[ x${JAVA} = x ] && JAVA=java

i just want to set it to /loc/java/jdk1.4.1/bin/java

any help?
 
If you already know the result you want, you can just replace the whole mess with

JAVA=/loc/java/jkd1.4.1/bin/java

Incidentally, the

[ stuff ] && [ more stuff ]

is a common abuse of shell behaviour. The effect of it is that 'more stuff' only gets done if 'stuff' succeeds. It seems to be used by people who think it's more important to save a few keystrokes than to make their code clear with a few if/then statements...
 
Back
Top