yyuu/pyenv — pull request #100 by ibuildthecloud (2014-01-09 04:51:50+00:00)
Title: Support shims that are sourced in bash

This change was done specifically to support virtualenvwrapper which
provides scripts that are supposed to be sourced into your current shell.
The BASH_SOURCE variable can be used determine the current file that is
being included. BASH_LINENO can be used to determine if the current
execution is an invocations or sourcing of a file. BASH_LINENO will
be 0 in a script invocation because there are no functions currently
on the stack. Finally, if your a currently sourcing a file, do not
do "set -e" as that will cause the interactive shell to close on any
error.