Skip to content

Commit

Permalink
Merge remote branch 'fork/19'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Feb 21, 2015
2 parents a86796f + e0e3f12 commit af399b2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion jvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ _jvm-discover-and-set() {
if [ -z "$version" ] && [ -f .java-version ]; then
local version="$(cat .java-version)"
fi
if [ -z "$version" ] && [ -f ~/.java-version ]; then
local version="$(cat ~/.java-version)"
fi
[ ! -z "$version" ] && _jvm_set-java-path "$version"
}

Expand All @@ -36,9 +39,14 @@ jvm() {
case "$command" in
local)
echo "$@" > .java-version
_jvm-discover-and-set
;;
global)
echo "$@" > ~/.java-version
_jvm-discover-and-set
;;
*)
echo "Usage: jvm (local) <args>"
echo "Usage: jvm (local|global) <args>"
return 0
;;
esac
Expand Down

0 comments on commit af399b2

Please sign in to comment.