Browse Source

replace ruby reference with java

pull/4/head
Gildas Cuisinier 13 years ago
parent
commit
07517da2fa
  1. 6
      libexec/jenv-prefix
  2. 2
      libexec/jenv-rehash
  3. 6
      libexec/jenv-version-name
  4. 2
      libexec/jenv-versions

6
libexec/jenv-prefix

@ -22,9 +22,9 @@ elif [ -z "$JENV_VERSION" ]; then @@ -22,9 +22,9 @@ elif [ -z "$JENV_VERSION" ]; then
fi
if [ "$JENV_VERSION" = "system" ]; then
RUBY_PATH="$(jenv-which ruby)"
RUBY_PATH="${RUBY_PATH%/*}"
echo "${RUBY_PATH%/bin}"
JAVA_PATH="$(jenv-which java)"
JAVA_PATH="${JAVA_PATH%/*}"
echo "${JAVA_PATH%/bin}"
exit
fi

2
libexec/jenv-rehash

@ -78,7 +78,7 @@ set -e @@ -78,7 +78,7 @@ set -e
[ -n "\$JENV_DEBUG" ] && set -x
program="\${0##*/}"
if [ "\$program" = "ruby" ]; then
if [ "\$program" = "java" ]; then
for arg; do
case "\$arg" in
-e* | -- ) break ;;

6
libexec/jenv-version-name

@ -20,11 +20,11 @@ version_exists() { @@ -20,11 +20,11 @@ version_exists() {
if version_exists "$JENV_VERSION"; then
echo "$JENV_VERSION"
elif version_exists "${JENV_VERSION#ruby-}"; then
{ echo "warning: ignoring extraneous \`ruby-' prefix in version \`${JENV_VERSION}'"
elif version_exists "${JENV_VERSION#java-}"; then
{ echo "warning: ignoring extraneous \`java-' prefix in version \`${JENV_VERSION}'"
echo " (set by $(jenv-version-origin))"
} >&2
echo "${JENV_VERSION#ruby-}"
echo "${JENV_VERSION#java-}"
else
echo "jenv: version \`$JENV_VERSION' is not installed" >&2
exit 1

2
libexec/jenv-versions

@ -28,7 +28,7 @@ print_version() { @@ -28,7 +28,7 @@ print_version() {
}
# Include "system" in the non-bare output, if it exists
if [ -n "$include_system" ] && JENV_VERSION=system jenv-which ruby >/dev/null 2>&1; then
if [ -n "$include_system" ] && JENV_VERSION=system jenv-which java >/dev/null 2>&1; then
print_version system
fi

Loading…
Cancel
Save