From 36a5e7cb194807efd77f636cf9be010f322fb3e5 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 5 Feb 2009 01:23:14 +0100 Subject: fix if bashrc is executed twice --- bashrc/main.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bashrc/main.sh b/bashrc/main.sh index 43e11bc..baf2653 100644 --- a/bashrc/main.sh +++ b/bashrc/main.sh @@ -3,6 +3,9 @@ # test for interactive shell [[ $- != *i* ]] && return +# return if this script is executed twice +[[ -n $(declare -p _DOTFILES_DIR 2>/dev/null) ]] && return + declare -r _DOTFILES_DIR="${HOME}/.dotfiles" declare -r _BASHRC_DIR="${_DOTFILES_DIR}/bashrc" -- cgit v1.2.3