mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
18 lines
413 B
Text
18 lines
413 B
Text
|
#!/usr/bin/env bash
|
||
|
set -e
|
||
|
[ -n "$PYENV_DEBUG" ] && set -x
|
||
|
|
||
|
PYENV_VERSION_FILE="$1"
|
||
|
PYENV_VERSION="$2"
|
||
|
|
||
|
if [ -z "$PYENV_VERSION" ] || [ -z "$PYENV_VERSION_FILE" ]; then
|
||
|
echo "usage: pyenv write-version-file FILENAME VERSION" >&2
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
# Make sure the specified version is installed.
|
||
|
pyenv-prefix "$PYENV_VERSION" >/dev/null
|
||
|
|
||
|
# Write the version out to disk.
|
||
|
echo "$PYENV_VERSION" > "$PYENV_VERSION_FILE"
|