Skip to content

Commit

Permalink
增加 shell 判断,防止/usr/libexec/java_home不存在而报错
Browse files Browse the repository at this point in the history
  • Loading branch information
upliu committed Oct 27, 2014
1 parent 9bc4820 commit 0e57606
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,7 @@ fi

export PATH=$HOME/bin:$HOME/.composer/vendor/bin:$HOME/opt/bin:$HOME/opt/sbin:/usr/local/bin:/usr/local/sbin:$PATH
export EDITOR=vim
export JAVA_HOME=`/usr/libexec/java_home`
if [ -x /usr/libexec/java_home ]; then
export JAVA_HOME=`/usr/libexec/java_home`
fi

0 comments on commit 0e57606

Please sign in to comment.