From 5c835b659a83bad309e1a50cdbaff90f04f62875 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Fri, 2 Mar 2012 16:49:21 -0500 Subject: [PATCH] cannot leave java home with miserable cygdrive in it, even though cygwin needs that for the path. must fix it for path only. --- examples/custom_overrides/fred/java_profile.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/custom_overrides/fred/java_profile.sh b/examples/custom_overrides/fred/java_profile.sh index 713c31a1..2a9bc6a2 100755 --- a/examples/custom_overrides/fred/java_profile.sh +++ b/examples/custom_overrides/fred/java_profile.sh @@ -63,10 +63,6 @@ fi if [ ! -d "$JAVA_HOME" -a -z "$(whichable java 2>/dev/null)" ]; then intuition_failure JAVA_HOME unset JAVA_BIN_PIECE -else - if [ ! -z "$(uname -a | grep -i cygwin)" ]; then - JAVA_HOME=$(echo $JAVA_HOME | sed -e 's/^\(.\):/\/cygdrive\/\1/') - fi fi ############################ @@ -109,10 +105,18 @@ fi # any other paths to different versions. if [ ! -z "$JAVA_HOME" ]; then - export PATH=$JAVA_HOME/$JAVA_BIN_PIECE:$PATH + j="$JAVA_HOME" + if [ ! -z "$(uname -a | grep -i cygwin)" ]; then + j=$(echo $j | sed -e 's/^\(.\):/\/cygdrive\/\1/') + fi + export PATH=$j/$JAVA_BIN_PIECE:$PATH fi if [ ! -z "$ECLIPSE_DIR" ]; then - export PATH=$ECLIPSE_DIR:$PATH + e="$ECLIPSE_DIR" + if [ ! -z "$(uname -a | grep -i cygwin)" ]; then + e=$(echo $e | sed -e 's/^\(.\):/\/cygdrive\/\1/') + fi + export PATH=$e:$PATH fi ############################ -- 2.34.1