Browse Source

add include file

Harald Achitz 9 years ago
parent
commit
8ae63c9d2a
1 changed files with 21 additions and 0 deletions
  1. 21 0
      bbenv.include

+ 21 - 0
bbenv.include

@@ -0,0 +1,21 @@
+
+#might possible not run with each shell, 
+#todo, test with zsh
+if [ "$BASH_SOURCE" = "$0" ] ; then
+    echo "not running included!"
+    echo "source this file to use it"
+    exit 1
+fi 
+
+
+
+bbplay_root_dir=$(dirname $(readlink -f "$BASH_SOURCE"))
+bitbake_root_dir=$bbplay_root_dir/bitbake
+
+if [ -d $bitbake_root_dir ] ; then
+  export PATH=$bitbake_root_dir/bin:$PATH
+  export PYTHONPATH=$bitbake_root_dir/lib:$PYHTONPATH
+else
+  echo "ERROR: $bitbake_root_dir does not exist"
+  
+fi