hiding some warning noise on stderr.
authorChris Koeritz <fred@gruntose.com>
Fri, 9 Mar 2012 14:15:51 +0000 (09:15 -0500)
committerChris Koeritz <fred@gruntose.com>
Fri, 9 Mar 2012 14:15:51 +0000 (09:15 -0500)
examples/custom_overrides/fred/java_profile.sh

index 4d55c6db0da8c6ce84f10b109610c5d7e68a38f1..612308e698b791000c8b3186f797b1bbd2c36fbb 100755 (executable)
@@ -50,12 +50,12 @@ if [ ! -d "$JAVA_HOME" ]; then
   export JAVA_HOME=/usr/lib/jvm/java-7-oracle/jre
 fi
 if [ ! -d "$JAVA_HOME" ]; then
-  JAVA_HOME="$(ls -d c:/tools/*jdk*)"
+  JAVA_HOME="$(ls -d c:/tools/*jdk* 2>/dev/null)"
 fi
 if [ ! -d "$JAVA_HOME" ]; then
-  if [ ! -z "$(grep 'd:' /proc/mounts)" ]; then
+  if [ ! -z "$(grep 'd:' /proc/mounts 2>/dev/null)" ]; then
     # try using a windows version.
-    JAVA_HOME="$(ls -d d:/tools/*jdk*)"
+    JAVA_HOME="$(ls -d d:/tools/*jdk* 2>/dev/null)"
   fi
 fi
 # this should go last, since it changes the bin dir.