projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new fortune.
[feisty_meow.git]
/
customizing
/
fred
/
java_profile.sh
diff --git
a/customizing/fred/java_profile.sh
b/customizing/fred/java_profile.sh
index 67cb90fbee2c0f01dd01154683db1fade075d642..3db3b615d803feebb8b5d2f3b5d87dacc0934e39 100644
(file)
--- a/
customizing/fred/java_profile.sh
+++ b/
customizing/fred/java_profile.sh
@@
-6,16
+6,7
@@
############################
############################
-function whichable()
-{
- to_find="$1"; shift
- which which &>/dev/null
- if [ $? -ne 0 ]; then
- # there is no which command here. we produce nothing due to this.
- echo
- fi
- echo $(which $to_find)
-}
+source $FEISTY_MEOW_SCRIPTS/core/functions.sh
# this reports when we have totally failed to figure out where a folder
# is actually located on the machine.
# this reports when we have totally failed to figure out where a folder
# is actually located on the machine.
@@
-42,15
+33,17
@@
export ANT_OPTS="-Xms512m -Xmx768m -XX:MaxPermSize=768m"
export JAVA_BIN_PIECE=bin
if [ ! -d "$JAVA_HOME" ]; then
export JAVA_BIN_PIECE=bin
if [ ! -d "$JAVA_HOME" ]; then
- # first try a recent linux version.
- export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre
+ # try a recent version.
+ export JAVA_HOME=/usr/lib/jvm/java-7-oracle
+fi
+if [ ! -d "$JAVA_HOME" ]; then
+ JAVA_HOME="$(ls -d c:/tools/*jdk* 2>/dev/null)"
fi
if [ ! -d "$JAVA_HOME" ]; then
fi
if [ ! -d "$JAVA_HOME" ]; then
- # try an even more recent version.
- export JAVA_HOME=/usr/lib/jvm/java-7-oracle/jre
+ JAVA_HOME="$(ls -d "c:/Program Files"/*jdk* 2>/dev/null)"
fi
if [ ! -d "$JAVA_HOME" ]; then
fi
if [ ! -d "$JAVA_HOME" ]; then
- JAVA_HOME="$(ls -d
c:/tools
/*jdk* 2>/dev/null)"
+ JAVA_HOME="$(ls -d
"c:/Program Files (x86)"
/*jdk* 2>/dev/null)"
fi
if [ ! -d "$JAVA_HOME" ]; then
if [ ! -z "$(grep -i 'd:' /proc/mounts 2>/dev/null)" ]; then
fi
if [ ! -d "$JAVA_HOME" ]; then
if [ ! -z "$(grep -i 'd:' /proc/mounts 2>/dev/null)" ]; then
@@
-77,7
+70,7
@@
fi
# intuit where we have our local eclipse.
if [ ! -d "$ECLIPSE_DIR" ]; then
# intuit where we have our local eclipse.
if [ ! -d "$ECLIPSE_DIR" ]; then
- export ECLIPSE_DIR=/usr/local/eclipse
_jee
+ export ECLIPSE_DIR=/usr/local/eclipse
fi
if [ ! -d "$ECLIPSE_DIR" ]; then
ECLIPSE_DIR=$HOME/eclipse
fi
if [ ! -d "$ECLIPSE_DIR" ]; then
ECLIPSE_DIR=$HOME/eclipse
@@
-89,12
+82,12
@@
if [ ! -d "$ECLIPSE_DIR" ]; then
ECLIPSE_DIR="c:/tools/eclipse"
fi
if [ ! -d "$ECLIPSE_DIR" ]; then
ECLIPSE_DIR="c:/tools/eclipse"
fi
if [ ! -d "$ECLIPSE_DIR" ]; then
- if [ ! -z "$(grep -i 'd:' /proc/mounts)" ]; then
+ if [ ! -z "$(grep -i 'd:' /proc/mounts
2>/dev/null
)" ]; then
ECLIPSE_DIR="d:/tools/eclipse"
fi
fi
if [ ! -d "$ECLIPSE_DIR" ]; then
ECLIPSE_DIR="d:/tools/eclipse"
fi
fi
if [ ! -d "$ECLIPSE_DIR" ]; then
- if [ ! -z "$(grep -i 'e:' /proc/mounts)" ]; then
+ if [ ! -z "$(grep -i 'e:' /proc/mounts
2>/dev/null
)" ]; then
ECLIPSE_DIR="e:/tools/eclipse"
fi
fi
ECLIPSE_DIR="e:/tools/eclipse"
fi
fi
@@
-133,4
+126,5
@@
fi
############################
############################
+#echo "java_profile: JAVA_HOME='$JAVA_HOME' ECLIPSE_DIR='$ECLIPSE_DIR'"