Created
August 24, 2017 12:07
-
-
Save aperezdc/035b115a752a72207747a885a906d5bd to your computer and use it in GitHub Desktop.
Autoenv snippet for WebKit source trees
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
# | |
# Place this in the root directory of a WebKit source tree. | |
# | |
# This needs the following Zsh plug-ins: | |
# | |
# https://github.com/Tarrasch/zsh-autoenv | |
# https://github.com/aperezdc/virtualz | |
# | |
autostash WEBKIT_TOP_LEVEL="${0:A:h}" | |
autostash CCACHE_BASEDIR="${WEBKIT_TOP_LEVEL}" | |
autostash PATH="${PATH}:${WEBKIT_TOP_LEVEL}/Tools/Scripts" | |
export WEBKIT_TOP_LEVEL | |
# Create or activate a Python 2.x virtualenv | |
autostash VIRTUALZ_HOME="${WEBKIT_TOP_LEVEL}/.virtualz" | |
if vz _exists webkit ; then | |
vz activate webkit | |
else | |
echo '* Creating Python 2.x virtualenv...' | |
vz new webkit -p python2 | |
fi | |
if [[ ! -r ${WEBKIT_TOP_LEVEL}/.autoenv_leave.zsh ]] ; then | |
echo 'vz deactivate' > "${WEBKIT_TOP_LEVEL}/.autoenv_leave.zsh" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment