comparison .bashrc @ 879:79b52aec477e

function for java_home
author Jeff Hammel <k0scist@gmail.com>
date Fri, 24 May 2019 15:34:11 -0700
parents 297cb56a2360
children 47d50c70ec04
comparison
equal deleted inserted replaced
878:e641fdf325bb 879:79b52aec477e
597 597
598 exists() { 598 exists() {
599 while read line; do echo ${line} : $(($(test "-e ${line}"\") )); done 599 while read line; do echo ${line} : $(($(test "-e ${line}"\") )); done
600 } 600 }
601 601
602 java_home() {
603 /usr/bin/env java -XshowSettings:properties -version 2>&1 | grep "java.home" | awk '{ print $NF; }'
604 }
605
602 ### ruby version manager 606 ### ruby version manager
603 [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* 607 [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
604 export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting 608 export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
605 609
606 ### include overrides for commands 610 ### include overrides for commands