If JAVA_HOME is defined, add JAVA_HOME/bin to path
authorColin Patrick Mccabe <cmccabe@alumni.cmu.edu>
Fri, 31 Aug 2012 19:55:47 +0000 (12:55 -0700)
committerColin Patrick Mccabe <cmccabe@alumni.cmu.edu>
Fri, 31 Aug 2012 19:55:47 +0000 (12:55 -0700)
Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>

.bashrc

diff --git a/.bashrc b/.bashrc
index ca8b97a..07c0f53 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -43,6 +43,11 @@ case $- in
        ;;
 esac
 
+if [ -f "${JAVA_HOME}" ]; then
+        :
+else
+        export PATH="${PATH}:${JAVA_HOME}/bin"
+fi
 # Perturb malloc so that we spot bugs quicker!
 export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))