Last active
September 10, 2021 19:17
-
-
Save RHDZMOTA/aca6387eb599e2f50a18c14ee9ea3824 to your computer and use it in GitHub Desktop.
Cross operative system pyenv installer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
manage() { | |
local command="${1}" | |
case "${command}" in | |
install) | |
case "${OSTYPE}" in | |
msys) | |
echo "Installing pyenv-win" | |
git clone https://github.com/pyenv-win/pyenv-win.git "${HOME}/.pyenv-github" | |
ln -s "${HOME}/.pyenv-github/pyenv-win" "${HOME}/.pyenv" | |
;; | |
*) | |
echo "Installing pyenv" | |
git clone https://github.com/pyenv/pyenv.git "${HOME}/.pyenv-github" | |
ln -s "${HOME}/.pyenv-github" "${HOME}/.pyenv" | |
;; | |
esac | |
;; | |
update) | |
echo "Updating pyenv" | |
(cd "${HOME}/.pyenv-github"; git pull origin master) | |
;; | |
esac | |
} | |
manage "${@}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redirect() { | |
set -e | |
curl -L https://gist.githubusercontent.com/RHDZMOTA/aca6387eb599e2f50a18c14ee9ea3824/raw/44ff67cad019c1b78de357241448f779d7cc6598/pyenv-manage.sh | bash -s -- install | |
} | |
redirect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s -S -L https://gist.githubusercontent.com/RHDZMOTA/aca6387eb599e2f50a18c14ee9ea3824/raw/44ff67cad019c1b78de357241448f779d7cc6598/pyenv-manage.sh | bash -s -- update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment