Permalink
Browse files

oebb: recreate environment file on BASE_VERSION mismatch

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
  • Loading branch information...
1 parent 088be90 commit 52e95303860bdfe9b700b635a8be52b56e9f05ac @koenkooi koenkooi committed May 5, 2011
Showing with 15 additions and 2 deletions.
  1. +15 −2 oebb.sh
View
17 oebb.sh
@@ -31,6 +31,8 @@ PROXYHOST=""
# OE_BASE - The root directory for all OE sources and development.
###############################################################################
OE_BASE=${PWD}
+# incremement this to force recreation of config files
+BASE_VERSION=1
###############################################################################
# SET_ENVIRONMENT() - Setup environment variables for OE development
@@ -44,6 +46,16 @@ export BBFETCH2=True
#--------------------------------------------------------------------------
# If an env already exists, use it, otherwise generate it
#--------------------------------------------------------------------------
+
+if [ -e ~/.oe/environment-oecore ] ; then
+ . ~/.oe/environment-oecore
+fi
+
+if [ x"${BASE_VERSION}" != x"${SCRIPTS_BASE_VERSION}" ] ; then
+ echo "BASE_VERSION mismatch, recreating ~/.oe/environment-oecore"
+ rm ~/.oe/environment-oecore
+fi
+
if [ -e ~/.oe/environment-oecore ] ; then
. ~/.oe/environment-oecore
else
@@ -56,7 +68,8 @@ else
DISTRO="angstrom-2010.x"
DISTRO_DIRNAME=`echo $DISTRO | sed s#[.-]#_#g`
- echo "export BBFETCH2=True" > ~/.oe/environment-oecore
+ echo "export SCRIPTS_BASE_VERSION=${BASE_VERSION}" > ~/.oe/environment-oecore
+ echo "export BBFETCH2=True" >> ~/.oe/environment-oecore
echo "export DISTRO=\"${DISTRO}\"" >> ~/.oe/environment-oecore
echo "export DISTRO_DIRNAME=\"${DISTRO_DIRNAME}\"" >> ~/.oe/environment-oecore
@@ -279,7 +292,7 @@ TMPDIR = "${OE_BUILD_TMPDIR}"
#HTTP_PROXY = "http://${PROXYHOST}:${PROXYPORT}/"
_EOF
-
+fi
if [ ! -e ${OE_BUILD_DIR}/conf/auto.conf ]; then
cat > ${OE_BUILD_DIR}/conf/auto.conf <<_EOF
MACHINE ?= "${MACHINE}"

0 comments on commit 52e9530

Please sign in to comment.