Created
May 21, 2013 19:43
-
-
Save hilios/5622613 to your computer and use it in GitHub Desktop.
Execute shell command getting aware of pythonbrew configuration
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
# http://joshuawherring.com/blog/?p=2361 | |
source "/path/to/.pythonbrew/etc/bashrc" | |
VENV=$2 | |
PY=$1 | |
pythonbrew use ${PY} | |
echo "Using ${PY}" | |
pythonbrew venv use ${VENV} | |
echo "Venv ${VENV}" | |
shift 2 | |
echo "Executing $@ in ${VENV}" | |
exec "$@" | |
deactivate | |
pythonbrew off |
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
sh /path/to/api/runapi 2.7.3 api python /path/to/api/nameofprogram.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment