diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-01-31 11:38:35 +0000 |
---|---|---|
committer | Joshua Lock <josh@linux.intel.com> | 2011-01-31 11:38:35 +0000 |
commit | 7e206c6477934df9d885e4d109e15705d88907b2 (patch) | |
tree | b2ff16aa263c403a2dfa39dba8ee45d0c3863e71 /scripts | |
parent | 92f1b4976b4352d0dbd43392b59628c85873b063 (diff) | |
download | poky-7e206c6477934df9d885e4d109e15705d88907b2.tar.gz |
scripts/bitbake: remove bashisms
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>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/bitbake | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/bitbake b/scripts/bitbake index 55bc8fd437..f40bd28260 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 | |||
3 | needpseudo="1" | 3 | needpseudo="1" |
4 | for opt in $@; do | 4 | for opt in $@; do |
5 | for key in $NO_BUILD_OPTS; do | 5 | for key in $NO_BUILD_OPTS; do |
6 | if [ $opt == $key ] | 6 | if [ $opt = $key ] |
7 | then | 7 | then |
8 | needpseudo="0" | 8 | needpseudo="0" |
9 | break | 9 | break |
10 | fi | 10 | fi |
11 | done | 11 | done |
12 | [ $needpseudo == "0" ] && break | 12 | [ $needpseudo = "0" ] && break |
13 | done | 13 | done |
14 | 14 | ||
15 | buildpseudo="1" | 15 | buildpseudo="1" |
16 | if [ $needpseudo == "1" -a -e "$BUILDDIR/pseudodone" ]; then | 16 | if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then |
17 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` | 17 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` |
18 | if [ -e "$PSEUDOBINDIR/pseudo" ]; then | 18 | if [ -e "$PSEUDOBINDIR/pseudo" ]; then |
19 | buildpseudo="0" | 19 | buildpseudo="0" |
20 | fi | 20 | fi |
21 | fi | 21 | fi |
22 | if [ $needpseudo == "0" ]; then | 22 | if [ $needpseudo = "0" ]; then |
23 | buildpseudo="0" | 23 | buildpseudo="0" |
24 | fi | 24 | fi |
25 | 25 | ||
26 | OLDPATH=$PATH | 26 | OLDPATH=$PATH |
27 | export PATH=`echo $PATH | sed s#[^:]*/scripts:##` | 27 | export PATH=`echo $PATH | sed s#[^:]*/scripts:##` |
28 | if [ $buildpseudo == "1" ]; then | 28 | if [ $buildpseudo = "1" ]; then |
29 | echo "Pseudo is not present but is required, building this first before the main build" | 29 | echo "Pseudo is not present but is required, building this first before the main build" |
30 | bitbake pseudo-native -c populate_sysroot | 30 | bitbake pseudo-native -c populate_sysroot |
31 | ret=$? | 31 | ret=$? |
@@ -43,7 +43,7 @@ if [ $buildpseudo == "1" ]; then | |||
43 | fi | 43 | fi |
44 | BITBAKE=`which bitbake` | 44 | BITBAKE=`which bitbake` |
45 | export PATH=$OLDPATH | 45 | export PATH=$OLDPATH |
46 | if [ $needpseudo == "1" ]; then | 46 | if [ $needpseudo = "1" ]; then |
47 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` | 47 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` |
48 | PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@ | 48 | PSEUDO_BINDIR=$PSEUDOBINDIR PSEUDO_LIBDIR=$PSEUDOBINDIR/../lib/pseudo/lib PSEUDO_PREFIX=$PSEUDOBINDIR/../../ PSEUDO_DISABLED=1 $PSEUDOBINDIR/pseudo $BITBAKE $@ |
49 | else | 49 | else |