Mercurial > hg > config
changeset 879:79b52aec477e
function for java_home
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Fri, 24 May 2019 15:34:11 -0700 |
parents | e641fdf325bb |
children | cd1ebc68739f |
files | .bashrc |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/.bashrc Sat May 11 14:39:45 2019 -0700 +++ b/.bashrc Fri May 24 15:34:11 2019 -0700 @@ -599,6 +599,10 @@ while read line; do echo ${line} : $(($(test "-e ${line}"\") )); done } +java_home() { + /usr/bin/env java -XshowSettings:properties -version 2>&1 | grep "java.home" | awk '{ print $NF; }' +} + ### ruby version manager [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting