Skip to content

Commit

Permalink
Make sure the anti-recursive checks behave well
Browse files Browse the repository at this point in the history
  • Loading branch information
gioele committed Aug 11, 2012
1 parent 3a10766 commit 74237f6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bashrc_dispatch
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@

EXPORT_FUNCTIONS=true

[ -n "$SHELL_FOR" ] && [ $$ -eq "$SHELL_FOR" ] && exit # Avoid recursive invocation
SHELL_FOR=$$
# Avoid recursive invocation
[ -n "$BASHRC_DISPATCH_PID" ] && [ $$ -eq "$BASHRC_DISPATCH_PID" ] && exit
BASHRC_DISPATCH_PID=$$


SHELL_PLATFORM='OTHER'
case "$MACHTYPE" in
Expand Down Expand Up @@ -56,3 +58,5 @@ unset fn_cmd
[ -f "${HOME}/.bashrc_script" ] && shell_is_script && . "${HOME}/.bashrc_script"
[ -f "${HOME}/.bashrc_interactive" ] && shell_is_interactive && . "${HOME}/.bashrc_interactive"
[ -f "${HOME}/.bashrc_login" ] && shell_is_login && . "${HOME}/.bashrc_login"

unset BASHRC_DISPATCH_PID

0 comments on commit 74237f6

Please sign in to comment.