From 38457c4451a5cc2c4c9267ba72fd146ba0568f10 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 6 Jan 2018 22:52:40 +0000 Subject: [PATCH] Conditionally execute .bashrc only if it hasn't been done so already --- .bash_profile | 4 +++- .bashrc | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.bash_profile b/.bash_profile index fc8810a..0c28ff7 100644 --- a/.bash_profile +++ b/.bash_profile @@ -6,5 +6,7 @@ fi cat /dev/shm/cloudcatcher-banner.txt; -source $HOME/.bashrc; +if [ "${sbrl_bashrc_executed}" = "" ]; then + source $HOME/.bashrc; +fi diff --git a/.bashrc b/.bashrc index 4f73b05..e57f6cc 100644 --- a/.bashrc +++ b/.bashrc @@ -8,6 +8,8 @@ case $- in *) return;; esac +sbrl_bashrc_executed=true; + # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth