summaryrefslogtreecommitdiffstats
path: root/contrib
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
parent9633dc85c57a0a6de1b088b49e589513087c2720 (diff)
downloadbitbake-d91e57c44e923b6b65396515ff878199d43763a1.tar.gz
Initial import.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/bash-completion59
-rw-r--r--contrib/bbdev.sh31
2 files changed, 31 insertions, 59 deletions
diff --git a/contrib/bash-completion b/contrib/bash-completion
deleted file mode 100644
index 2740f317e..000000000
--- a/contrib/bash-completion
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Bash completion for oemake
-#
-# contact: oe at haslup dot com
-#
-#
-# Uses $OEDIR to find your local.conf in which it
-# expects OEFILES to be defined.
-#
-# If it's not, feel free to add an OEFILES like below:
-#OEFILES="/data/zaurus/openembedded/packages/*/*.oe"
-#
-
-
-_oefiles_update ()
-{
- if [ -e $OEDIR/conf/local.conf ]; then
- OEFILES=`grep -E "^OEFILES" $OEDIR/conf/local.conf|sed 's/^.*= *//'`
- else
- echo "Couldn't find conf/local.conf, maybe set OEDIR?"
- fi
-
- export COMPLETE_OE_PKG_CACHE=$(for f in `ls ${OEFILES//\"/}` ; do basename $f | sed 's/\_.*$//' ; done)
-}
-
-_oemake_cached ()
-{
- local packages cur
-
- COMPREPLY=()
- cur=${COMP_WORDS[COMP_CWORD]}
-
- COMPREPLY=( $(compgen -W '$COMPLETE_OE_PKG_CACHE' -- $cur ) )
-}
-
-_oemake ()
-{
- local packages cur
-
- COMPREPLY=()
- cur=${COMP_WORDS[COMP_CWORD]}
-
- _oefiles_update
-
- COMPREPLY=( $(compgen -W '$COMPLETE_OE_PKG_CACHE' -- $cur ) )
- #COMPREPLY=( $( (compgen -W '$(for f in `find $OE_PKG_DIR -not -path "*SCCS*" -name "*.oe" -exec basename {} \;` ; do echo $f | sed 's/\_.*$//' ;
-done)' -- $cur ) ) )
-}
-
-_oefiles_update
-
-# Choose one of the commands below... the cached version is pretty quick, but might need
-# refreshing each time you update your packages directory. Non-cached is too slow
-# on my P4-1.8ghz.
-#
-# If you can use the non-cached, more power to you and your speedy machine :)
-#
-complete -F _oemake_cached oemake
-#complete -F _oemake oemake
diff --git a/contrib/bbdev.sh b/contrib/bbdev.sh
new file mode 100644
index 000000000..ed0f594a4
--- /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
+}