diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2009-02-05 01:23:14 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2009-02-05 01:23:14 +0100 |
commit | 36a5e7cb194807efd77f636cf9be010f322fb3e5 (patch) | |
tree | 5ca6ccdfd4500b75284b60721834f6ab629b2e5b /bashrc/main.sh | |
parent | 9cabeb44b6286da9a7de6d2ff5d8fa386561daef (diff) | |
download | dotfiles-36a5e7cb194807efd77f636cf9be010f322fb3e5.tar.gz dotfiles-36a5e7cb194807efd77f636cf9be010f322fb3e5.tar.xz dotfiles-36a5e7cb194807efd77f636cf9be010f322fb3e5.zip |
fix if bashrc is executed twice
Diffstat (limited to 'bashrc/main.sh')
-rw-r--r-- | bashrc/main.sh | 3 |
1 files changed, 3 insertions, 0 deletions
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" |