1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-10 04:23:47 -05:00

Extract rbenv-version-file{,-read,-write}

This commit is contained in:
Sam Stephenson
2011-08-18 14:11:40 -05:00
parent 1d5c6531a2
commit 506bc3634f
7 changed files with 70 additions and 70 deletions

View File

@@ -0,0 +1,15 @@
#!/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"