aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/bbdev.sh
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-12-07 20:55:41 +0000
committerChris Larson <clarson@kergoth.com>2004-12-07 20:55:41 +0000
commitd91e57c44e923b6b65396515ff878199d43763a1 (patch)
treec891ef94238989d3efb004cc3d22a280b642260b /contrib/bbdev.sh
parent9633dc85c57a0a6de1b088b49e589513087c2720 (diff)
downloadbitbake-d91e57c44e923b6b65396515ff878199d43763a1.tar.gz
bitbake-d91e57c44e923b6b65396515ff878199d43763a1.tar.bz2
bitbake-d91e57c44e923b6b65396515ff878199d43763a1.zip
Initial import.
Diffstat (limited to 'contrib/bbdev.sh')
-rw-r--r--contrib/bbdev.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/bbdev.sh b/contrib/bbdev.sh
new file mode 100644
index 00000000..ed0f594a
--- /dev/null
+++ b/contrib/bbdev.sh
@@ -0,0 +1,31 @@
+# This is a shell function to be sourced into your shell or placed in your .profile,
+# which makes setting things up for BitBake a bit easier.
+#
+# The author disclaims copyright to the contents of this file and places it in the
+# public domain.
+
+oedev () {
+ local BBDIR PKGDIR BUILDDIR
+ if test x"$1" = "x--help"; then echo >&2 "syntax: oedev [oedir [pkgdir [builddir]]]"; return 1; fi
+ if test x"$1" = x; then BBDIR=`pwd`; else BBDIR=$1; fi
+ if test x"$2" = x; then PKGDIR=`pwd`; else PKGDIR=$2; fi
+ if test x"$3" = x; then BUILDDIR=`pwd`; else BUILDDIR=$3; fi
+
+ BBDIR=`readlink -f $BBDIR`
+ PKGDIR=`readlink -f $PKGDIR`
+ BUILDDIR=`readlink -f $BUILDDIR`
+ if ! (test -d $BBDIR && test -d $PKGDIR && test -d $BUILDDIR); then
+ echo >&2 "syntax: oedev [oedir [pkgdir [builddir]]]"
+ return 1
+ fi
+
+ PATH=$BBDIR/bin:$PATH
+ BBPATH=$BBDIR
+ if test x"$BBDIR" != x"$PKGDIR"; then
+ BBPATH=$PKGDIR:$BBPATH
+ fi
+ if test x"$PKGDIR" != x"$BUILDDIR"; then
+ BBPATH=$BUILDDIR:$BBPATH
+ fi
+ export BBPATH
+}