mirror of https://github.com/jenv/jenv.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
507 B
24 lines
507 B
#!/usr/bin/env bash |
|
set -e |
|
[ -n "$JENV_DEBUG" ] && set -x |
|
|
|
root="$JENV_DIR" |
|
while [ -n "$root" ]; do |
|
if [ -e "${root}/.jenv-version" ]; then |
|
echo "${root}/.jenv-version" |
|
exit |
|
fi |
|
root="${root%/*}" |
|
done |
|
|
|
global_version_file="${JENV_ROOT}/version" |
|
|
|
if [ -e "$global_version_file" ]; then |
|
echo "$global_version_file" |
|
elif [ -e "${JENV_ROOT}/global" ]; then |
|
echo "${JENV_ROOT}/global" |
|
elif [ -e "${JENV_ROOT}/default" ]; then |
|
echo "${JENV_ROOT}/default" |
|
else |
|
echo "$global_version_file" |
|
fi
|
|
|