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

import recent changes from ruby-build:

* verify checksum of downloaded archives.
* add PYTHON_BUILD_MIRROR_URL to use mirror site.
  But we don't have CloudFront setup as of now :-(
* rbenv 0.4.x style help messages
This commit is contained in:
Yamashita Yuu
2013-01-31 13:20:59 +09:00
parent a0705cb86e
commit 6d307c6e11
35 changed files with 377 additions and 147 deletions

View File

@@ -1,4 +1,15 @@
#!/usr/bin/env bash
#
# Summary: Uninstall a specific Python version
#
# Usage: pyenv uninstall [-f|--force] <version>
#
# -f Attempt to remove the specified version without prompting
# for confirmation. If the version does not exist, do not
# display an error message.
#
# See `pyenv versions` for a complete list of installed versions.
#
set -e
# Provide pyenv completions
@@ -11,7 +22,7 @@ if [ -z "$PYENV_ROOT" ]; then
fi
unset FORCE
if [ "$1" = "-f" ]; then
if [ "$1" = "-f" ] || [ "$1" = "--force" ]; then
FORCE=true
shift
fi
@@ -19,15 +30,9 @@ fi
DEFINITION="$1"
case "$DEFINITION" in
"" | -* )
{ echo "usage: pyenv uninstall [-f] VERSION"
echo
echo " -f Attempt to remove the specified version without prompting"
echo " for confirmation. If the version does not exist, do not"
echo " display an error message."
echo
echo "Installed versions:"
pyenv versions --bare | sed 's/^/ /'
echo
# We can remove the sed fallback once pyenv 0.4.0 is widely available.
{ pyenv-help uninstall 2>/dev/null ||
sed -ne '/^#/!q;s/.\{1,2\}//;1,4d;p' < "$0"
} >&2
exit 1
;;