From: Chris Koeritz Date: Sat, 11 Feb 2012 17:12:27 +0000 (-0500) Subject: nice differentiation for when java and eclipse are actually available, but our X-Git-Tag: 2.140.90~1623 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=c5682f6ef10420df03c81463a0fe4c709450b823 nice differentiation for when java and eclipse are actually available, but our limited heuristics couldn't find their home folders. --- 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 ############################