From 0149d3cc0825ae048e7e650295f2bd2b4f51bafe Mon Sep 17 00:00:00 2001 From: Robert Martin-Legene <robert@nic.ar> Date: Fri, 24 May 2019 14:10:03 -0300 Subject: [PATCH] Avoid errors from .bashrc if user removes bfa/ --- bin/installbfa.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/installbfa.sh b/bin/installbfa.sh index 1b242b6..ebc8cb2 100755 --- a/bin/installbfa.sh +++ b/bin/installbfa.sh @@ -167,7 +167,7 @@ function userconfig if [ $( expand < .bashrc | grep -E "source ${BFAHOME}/bin/env" | wc -l ) -eq 0 ] then info "Adding to automatically source ${BFAHOME}/bin/env via .bashrc" - echo "source ${BFAHOME}/bin/env" >> .bashrc + echo "test -r ${BFAHOME}/bin/env && source ${BFAHOME}/bin/env" >> .bashrc fi # cloning if not done already, or just update (pull) if [ ! -d "$BFAHOME" ] -- GitLab