Created
June 3, 2012 10:24
-
-
Save arcanis/2862946 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env sh | |
# Usage : | |
# $> sudo set-python-version 2; python -V | |
# Python 2.7.2 | |
# $> sudo set-python-version 3; python -V | |
# Python 3.2.2 | |
python=$(which python) | |
pythonX=$(which python$1) | |
if [ -h "$python" ]; then | |
rm "$python" | |
ln -s "$pythonX" "$python" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment