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.
19 lines
436 B
19 lines
436 B
#!/usr/bin/env bash |
|
# Usage: jenv version-file-write <file> <version> |
|
|
|
set -e |
|
[ -n "$JENV_DEBUG" ] && set -x |
|
|
|
JENV_VERSION_FILE="$1" |
|
JENV_VERSION="$2" |
|
|
|
if [ -z "$JENV_VERSION" ] || [ -z "$JENV_VERSION_FILE" ]; then |
|
jenv-help --usage version-file-write >&2 |
|
exit 1 |
|
fi |
|
|
|
# Make sure the specified version is installed. |
|
jenv-prefix "$JENV_VERSION" >/dev/null |
|
|
|
# Write the version out to disk. |
|
echo "$JENV_VERSION" > "$JENV_VERSION_FILE"
|
|
|