From: Chris Koeritz Date: Fri, 2 Mar 2012 21:49:21 +0000 (-0500) Subject: cannot leave java home with miserable cygdrive in it, even though cygwin needs X-Git-Tag: 2.140.90~1538 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=5c835b659a83bad309e1a50cdbaff90f04f62875 cannot leave java home with miserable cygdrive in it, even though cygwin needs that for the path. must fix it for path only. --- 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 ############################