1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-10 20:43:48 -05:00
Files
pyenv/libexec/rbenv-version-file-write
2011-08-18 15:28:35 -05:00

17 lines
381 B
Bash
Executable File

#!/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
exit 1
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"