Patchwork [2/3,v2] scripts/oe-setup-builddir: Keep track of TEMPLATECONF setting

login
register
mail settings
Submitter Gary Thomas
Date Feb. 24, 2014, 5:11 p.m.
Message ID <1393261909-14802-3-git-send-email-gary@mlbassoc.com>
Download mbox | patch
Permalink /patch/67287/
State New
Headers show

Comments

Gary Thomas - Feb. 24, 2014, 5:11 p.m.
Keeping track of the TEMPLATECONF variable in the build
tree will let this script produce the same output when
listing 'conf-notes.txt' every time the script is run,
regardless of whether or not TEMPLATECONF has been
provided by the user.

Note that the default value for TEMPLATECONF now comes from
an easily customizable file $OEROOT/.templateconf

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
---
 scripts/oe-setup-builddir |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Patch

diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir
index a869fdc..e4356f1 100755
--- a/scripts/oe-setup-builddir
+++ b/scripts/oe-setup-builddir
@@ -37,7 +37,15 @@  fi
 
 cd "$BUILDDIR"
 
-TEMPLATECONF=${TEMPLATECONF:-meta/conf}
+if (test -f "$BUILDDIR/conf/templateconf.cfg") then
+    TEMPLATECONF=$(cat $BUILDDIR/conf/templateconf.cfg)
+fi
+
+source $OEROOT/.templateconf
+
+if ! (test -f "$BUILDDIR/conf/templateconf.cfg") then
+    echo "$TEMPLATECONF" >$BUILDDIR/conf/templateconf.cfg
+fi
 
 # 
 # $TEMPLATECONF can point to a directory for the template local.conf & bblayers.conf