RobertLuptonTheGood/eups — pull request #8 by mjuric (2014-02-15 06:43:23+00:00)
Title: bugfix: make EUPS independent of $SHELL

Before this patch, EUPS detected the shell it's running under by inspecting
the SHELL environment variable. This is incorrect, since SHELL will point to
the *login* shell, and not the most recently run shell. This leads to errors
when a user starts a different shell w/o manually resetting the SHELL
variable; e.g.:

$ echo $SHELL
/bin/tcsh
$ bash
bash-3.2$ source bin/setups.csh
bash-3.2$ setup some_package
bash: setenv: command not found

This patch makes EUPS look for EUPS_SHELL environment variable, which is
defined in setups.[sh|csh|zsh] scripts. Since the knowledge of the running
shell is needed to support the setup/unsetup aliases, by defining EUPS_SHELL
in the same scripts the two cannot get out of sync.