summaryrefslogtreecommitdiffstats
path: root/setdevenv
diff options
context:
space:
mode:
authorMatthew Allum <mallum@openedhand.com>2005-08-31 11:21:44 +0000
committerMatthew Allum <mallum@openedhand.com>2005-08-31 11:21:44 +0000
commit8e65c870f9b2edb71b5e39d4a7314eca0c5a0f9a (patch)
tree1bd78c7d1e61885dbac536918fa337c28e2e8592 /setdevenv
parentd3fa3b8f9c1e302a532cee20278f38fc59cc32cb (diff)
downloadast2050-yocto-poky-8e65c870f9b2edb71b5e39d4a7314eca0c5a0f9a.zip
ast2050-yocto-poky-8e65c870f9b2edb71b5e39d4a7314eca0c5a0f9a.tar.gz
Make setdevenv automagically setup local.conf if it dont exist
git-svn-id: https://svn.o-hand.com/repos/poky@4 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'setdevenv')
-rwxr-xr-xsetdevenv11
1 files changed, 8 insertions, 3 deletions
diff --git a/setdevenv b/setdevenv
index c6945ca..0c3c572 100755
--- a/setdevenv
+++ b/setdevenv
@@ -4,7 +4,7 @@
# Change this to the location of this file.
# Also update the locations at the top of conf/local.conf
#
-OEROOT=/usr/ohoe/
+OEROOT=`pwd`
BBDIR=$OEROOT/bitbake/
PKGDIR=$OEROOT/openembedded/
@@ -20,10 +20,15 @@ PKGDIR=`readlink -f $PKGDIR`
BUILDDIR=`readlink -f $BUILDDIR`
if ! (test -d $BBDIR && test -d $PKGDIR && test -d $BUILDDIR); then
- echo >&2 "Error: Not all directories exist!"
+ echo >&2 "Error: Not all directories exist! Did you run this script in poky directory?"
exit 1
fi
-
+
+if !(test -r $PKGDIR/conf/local.conf); then
+ echo "Setting up initial '$PKGDIR/conf/local.conf'."
+ cat $PKGDIR/conf/local.conf.sample | sed -e"s|POKYROOT|${OEROOT}|" > $PKGDIR/conf/local.conf
+fi
+
BBPATH=$BBDIR
if test x"$BBDIR" != x"$PKGDIR"; then
BBPATH=$PKGDIR:$BBPATH
OpenPOWER on IntegriCloud