From fc1bd8c2c555683a154e9dea422282fe54cc2664 Mon Sep 17 00:00:00 2001 From: Joshua Bussdieker Date: Thu, 17 Nov 2011 22:47:36 -0800 Subject: [PATCH] Only add to .bashrc once! --- binscripts/gvm-installer | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/binscripts/gvm-installer b/binscripts/gvm-installer index f32a3fd..83a26f0 100644 --- a/binscripts/gvm-installer +++ b/binscripts/gvm-installer @@ -8,6 +8,10 @@ if [ -d $GVM_DEST/.gvm ]; then else echo "Installing" cd $GVM_DEST && git clone $SRC_REPO .gvm > /dev/null 2>&1 - echo '[[ -s "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm"' >> $ENV_FILE + + cat ~/.bashrc | grep "\[\[ -s \"\$HOME/.gvm/scripts/gvm\" ]] && source \"\$HOME/.gvm/scripts/gvm\"" > /dev/null 2>&1 + if [ $? -ne 0 ]; then + echo '[[ -s "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm"' >> $ENV_FILE + fi fi