mirror of
https://github.com/pyenv/pyenv.git
synced 2024-12-27 09:41:17 +00:00
16 lines
372 B
Text
16 lines
372 B
Text
|
#!/usr/bin/env bash
|
||
|
set -e
|
||
|
|
||
|
RBENV_VERSION_FILE="$1"
|
||
|
RBENV_VERSION="$2"
|
||
|
|
||
|
if [ -z "$RBENV_VERSION" ] || [ -z "$RBENV_VERSION_FILE" ]; then
|
||
|
echo "usage: rbenv write-version-file filename version" >&2
|
||
|
fi
|
||
|
|
||
|
# Make sure the specified version is installed.
|
||
|
rbenv-prefix "$RBENV_VERSION" >/dev/null
|
||
|
|
||
|
# Write the version out to disk.
|
||
|
echo "$RBENV_VERSION" > "$RBENV_VERSION_FILE"
|