Patchwork [fsl-community-bsp-base] setup-environment: Stop displaying imx6qsabresd when already configured

login
register
mail settings
Submitter Alexandre Belloni
Date April 21, 2014, 10:33 p.m.
Message ID <1398119626-3565-1-git-send-email-alexandre.belloni@free-electrons.com>
Download mbox | patch
Permalink /patch/70713/
State Accepted
Delegated to: Otavio Salvador
Headers show

Comments

Alexandre Belloni - April 21, 2014, 10:33 p.m.
When a build dir is already configured, using
'. ./setup-environment build' will display:
"Configuring for imx6qsabresd"
and
"Your configuration files at build have not been touched."
which is contradictory.

So test for an existing configuration before displaying the machine

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 setup-environment | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/setup-environment b/setup-environment
index a4b211657072..17adf15628b7 100644
--- a/setup-environment
+++ b/setup-environment
@@ -91,7 +91,9 @@  if [ "x$MACHINE" = "x" ] || [ "$VALID_MACHINE" = "0" ]; then
     usage && clean_up
     return 1
 else
-    echo "Configuring for ${MACHINE}"
+    if [ ! -e $1/conf/local.conf.sample ]; then
+        echo "Configuring for ${MACHINE}"
+    fi
 fi
 
 if [ -z "$SDKMACHINE" ]; then