All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Remove Bashisms from scripts/bitbake
@ 2011-01-31 12:29 Joshua Lock
  2011-01-31 12:30 ` [PATCH 1/1] scripts/bitbake: remove bashisms Joshua Lock
  0 siblings, 1 reply; 2+ messages in thread
From: Joshua Lock @ 2011-01-31 12:29 UTC (permalink / raw)
  To: poky

From: Joshua Lock <josh@linux.intel.com>

The BitBake wrapper script currently won't run under Dash, this patch removes
the Bash only syntax and ensures the script will run under Dash so that users
with this shell can get at least far enough to be advised that they should
run Bash.

Pull URL: git://git.pokylinux.org/poky-contrib.git
  Branch: josh/misc
  Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=josh/misc

Thanks,
    Joshua Lock <josh@linux.intel.com>
---


Joshua Lock (1):
  scripts/bitbake: remove bashisms

 scripts/bitbake |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

-- 
1.7.3.5



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] scripts/bitbake: remove bashisms
  2011-01-31 12:29 [PATCH 0/1] Remove Bashisms from scripts/bitbake Joshua Lock
@ 2011-01-31 12:30 ` Joshua Lock
  0 siblings, 0 replies; 2+ messages in thread
From: Joshua Lock @ 2011-01-31 12:30 UTC (permalink / raw)
  To: poky

From: Joshua Lock <josh@linux.intel.com>

As the BitBake script is the initial entry point for the system we need to
ensure it can run in as many places as possible, including systems which
aren't yest optimally configured for running Poky.
Remove some bashisms from the script so that it can run under Dash.

Pointers from: https://wiki.ubuntu.com/DashAsBinSh
Errors before this patch: http://pastie.org/1502136

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 scripts/bitbake |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/scripts/bitbake b/scripts/bitbake
index 55bc8fd..f40bd28 100755
--- a/scripts/bitbake
+++ b/scripts/bitbake
@@ -3,29 +3,29 @@ NO_BUILD_OPTS="--version -h --help -p --parse-only -s --show-versions -e --envir
 needpseudo="1"
 for opt in $@; do
 for key in $NO_BUILD_OPTS; do
-    if [ $opt == $key ]
+    if [ $opt = $key ]
     then
         needpseudo="0"
         break
     fi
 done
-[ $needpseudo == "0" ] && break
+[ $needpseudo = "0" ] && break
 done
 
 buildpseudo="1"
-if [ $needpseudo == "1" -a -e "$BUILDDIR/pseudodone" ]; then
+if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then
     PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
     if [ -e "$PSEUDOBINDIR/pseudo" ]; then
         buildpseudo="0"
     fi
 fi
-if [ $needpseudo == "0" ]; then
+if [ $needpseudo = "0" ]; then
     buildpseudo="0"
 fi
 
 OLDPATH=$PATH
 export PATH=`echo $PATH | sed s#[^:]*/scripts:##`
-if [ $buildpseudo == "1" ]; then
+if [ $buildpseudo = "1" ]; then
     echo "Pseudo is not present but is required, building this first before the main build"
     bitbake pseudo-native -c populate_sysroot
     ret=$?
@@ -43,7 +43,7 @@ if [ $buildpseudo == "1" ]; then
 fi
 BITBAKE=`which bitbake`
 export PATH=$OLDPATH
-if [ $needpseudo == "1" ]; then
+if [ $needpseudo = "1" ]; then
     PSEUDOBINDIR=`cat $BUILDDIR/pseudodone`
     PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@
 else
-- 
1.7.3.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-31 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-31 12:29 [PATCH 0/1] Remove Bashisms from scripts/bitbake Joshua Lock
2011-01-31 12:30 ` [PATCH 1/1] scripts/bitbake: remove bashisms Joshua Lock

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.