Skip to content

Instantly share code, notes, and snippets.

@yudai
Last active August 29, 2015 14:16
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 yudai/c613913b1123647655b1 to your computer and use it in GitHub Desktop.
Save yudai/c613913b1123647655b1 to your computer and use it in GitHub Desktop.
Find .gvm_local
function activate_gvm_pkgset() {
if [ -n "$__in_active_gvm_pkgset" ]; then
return
fi
__in_active_gvm_pkgset=true
nearest_local=((../)#.gvm_local/..(#qN)(:a))
if [ -d "$nearest_local" ] && \
[ "$nearest_local" != "$__gvm_local_path" ]; then
current=$(pwd)
cd $nearest_local
gvm pkgset use --local
__gvm_local_path=$nearest_local
cd $current
fi
unset __in_active_gvm_pkgset
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment