scripts: fix regression on reuse of shell environment variables
[AGL/meta-agl.git] / scripts / envsetup.sh
index 79d2a25..6ca10de 100644 (file)
@@ -7,10 +7,6 @@ fi
 
 MACHINE="$1"
 
-# set template conf for each <board/device>
-if [ -z "$TEMPLATECONF" ]; then
-    TEMPLATECONF="$PWD/meta-agl-demo/templates/$MACHINE/conf"
-fi
 
 case "$MACHINE" in
         "porter")
@@ -25,6 +21,13 @@ case "$MACHINE" in
                         fi
                 fi
 
+                if [ ! -d "$TEMPLATECONF" ]; then
+                    # set template conf for R-Car2 M2 Porter board
+                    TEMPLATECONF="$PWD/meta-renesas/meta-rcar-gen2/conf"
+                fi
+                ;;
+        "porter-nogfx")
+                MACHINE="porter"
                 if [ ! -d "$TEMPLATECONF" ]; then
                     # set template conf for R-Car2 M2 Porter board
                     TEMPLATECONF="$PWD/meta-renesas/meta-rcar-gen2/conf"
@@ -32,19 +35,33 @@ case "$MACHINE" in
                 ;;
         "intel-corei7-64")
                 ;;
+        "minnowboard")
+                # alias for minnowboardmax
+                MACHINE="intel-corei7-64"
+                ;;
         "qemux86")
                 ;;
         "qemux86-64")
                 ;;
+        "wandboard")
+                ;;
         *)
                 # nothing to do here
                 echo "WARN: '$MACHINE' is not tested by AGL Distro"
                 ;;
 esac
 
+# set template conf for each <board/device>
+if [ -z "$TEMPLATECONF" ]; then
+    if [ -d "$PWD/meta-agl-demo/templates/$MACHINE/conf" ]; then
+        TEMPLATECONF="$PWD/meta-agl-demo/templates/$MACHINE/conf"
+    fi
+fi
+
 echo "envsetup: Set '$1 as MACHINE."
 export MACHINE
 
+# fallback
 if [ ! -d "$TEMPLATECONF" ]; then
    # Allow to use templates at meta-agl-demo/conf
    TEMPLATECONF="$PWD/meta-agl-demo/conf"