Skip to content

Instantly share code, notes, and snippets.

@aperezdc
Created August 24, 2017 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aperezdc/035b115a752a72207747a885a906d5bd to your computer and use it in GitHub Desktop.
Save aperezdc/035b115a752a72207747a885a906d5bd to your computer and use it in GitHub Desktop.
Autoenv snippet for WebKit source trees
#
# 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