From a67a476e8d2ab91e2f47f301fa0df90806d8bfb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Martin-Leg=C3=A8ne?= <robert@nic.ar> Date: Fri, 28 Sep 2018 10:53:13 -0300 Subject: [PATCH] Do not trust grep(1) to return a reasonable exit value --- bin/installbfa.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/installbfa.sh b/bin/installbfa.sh index bc467f0..17ff00e 100755 --- a/bin/installbfa.sh +++ b/bin/installbfa.sh @@ -158,7 +158,7 @@ function usersetup git pull # cd ~bfa - if expand < .bashrc | grep -Evq 'source .*bfa/bin/env' + if [ $( expand < .bashrc | grep -E 'source .*bfa/bin/env' | wc -l ) -eq 0 ] then info Adding to automatically source \~bfa/bfa/bin/env via .bashrc echo 'source ~/bfa/bin/env' >> .bashrc -- GitLab