From c5682f6ef10420df03c81463a0fe4c709450b823 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sat, 11 Feb 2012 12:12:27 -0500 Subject: [PATCH] nice differentiation for when java and eclipse are actually available, but our limited heuristics couldn't find their home folders. --- examples/custom_overrides/fred/java_profile.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/examples/custom_overrides/fred/java_profile.sh b/examples/custom_overrides/fred/java_profile.sh index 82bf336e..d5cbc503 100644 --- a/examples/custom_overrides/fred/java_profile.sh +++ b/examples/custom_overrides/fred/java_profile.sh @@ -31,6 +31,7 @@ if [ ! -d "$JAVA_HOME" ]; then export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre fi if [ ! -d "$JAVA_HOME" ]; then + # try an even more recent version. export JAVA_HOME=/usr/lib/jvm/java-7-oracle/jre fi if [ ! -d "$JAVA_HOME" ]; then @@ -59,8 +60,12 @@ if [ ! -d "$JAVA_HOME" ]; then fi # last thing is to tell them we couldn't find it. if [ ! -d "$JAVA_HOME" ]; then - intuition_failure JAVA_HOME - unset JAVA_BIN_PIECE + if [ ! -z "$(which java)" ]; then + echo "JAVA_HOME unknown, but java is in path." + else + intuition_failure JAVA_HOME + unset JAVA_BIN_PIECE + fi fi ############################ @@ -89,7 +94,13 @@ if [ ! -d "$ECLIPSE_DIR" ]; then ECLIPSE_DIR="/e/tools/eclipse" fi # final option is to whine. -if [ ! -d "$ECLIPSE_DIR" ]; then intuition_failure ECLIPSE_DIR; fi +if [ ! -d "$ECLIPSE_DIR" ]; then + if [ ! -z "$(which eclipse)" ]; then + echo "ECLIPSE_DIR unknown, but eclipse is in path." + else + intuition_failure ECLIPSE_DIR; + fi +fi ############################ -- 2.34.1