From 7fe5a1ac2f1b8e88e40ba44358f30b53334297aa Mon Sep 17 00:00:00 2001 From: root Date: Fri, 9 Mar 2012 09:13:13 -0500 Subject: [PATCH] fixed up tangled checks for whether we were in hot water or not. --- examples/custom_overrides/fred/java_profile.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/examples/custom_overrides/fred/java_profile.sh b/examples/custom_overrides/fred/java_profile.sh index 72709c67..4d55c6db 100755 --- a/examples/custom_overrides/fred/java_profile.sh +++ b/examples/custom_overrides/fred/java_profile.sh @@ -65,10 +65,12 @@ if [ ! -d "$JAVA_HOME" ]; then JAVA_BIN_PIECE=Commands fi # last thing is to tell them we couldn't find it. -if [ ! -d "$JAVA_HOME" -a -z "$(whichable java 2>/dev/null)" ]; then - intuition_failure JAVA_HOME +if [ ! -d "$JAVA_HOME" ]; then unset JAVA_HOME unset JAVA_BIN_PIECE + if [ -z "$(whichable java 2>/dev/null)" ]; then + intuition_failure JAVA_HOME + fi fi ############################ @@ -97,14 +99,17 @@ if [ ! -d "$ECLIPSE_DIR" ]; then fi fi # final option is to whine. -if [ ! -d "$ECLIPSE_DIR" -a -z "$(whichable eclipse 2>/dev/null)" ]; then - intuition_failure ECLIPSE_DIR +if [ ! -d "$ECLIPSE_DIR" ]; then unset ECLIPSE_DIR else if [ ! -z "$(uname -a | grep -i cygwin)" ]; then + # fix the path for cygwin's bizarre requirement of /cygdrive/X. ECLIPSE_DIR=$(echo $ECLIPSE_DIR | sed -e 's/^\(.\):/\/cygdrive\/\1/') fi fi +if [ -z "$ECLIPSE_DIR" -a -z "$(whichable eclipse 2>/dev/null)" ]; then + intuition_failure ECLIPSE_DIR +fi ############################ -- 2.34.1