From: akpm@linux-foundation.org
To: sam@ravnborg.org
Cc: linux-kbuild@vger.kernel.org, akpm@linux-foundation.org,
werner@openmoko.org, randy.dunlap@oracle.com
Subject: [patch 8/8] scripts/extract-ikconfig: remove bashisms
Date: Mon, 01 Dec 2008 14:21:08 -0800 [thread overview]
Message-ID: <200812012221.mB1ML8FS013118@imap1.linux-foundation.org> (raw)
From: Werner Almesberger <werner@openmoko.org>
scripts/extract-ikconfig contains a lot of gratuituous bashisms, which
make it fail if /bin/sh isn't bash. This patch replaces them with regular
Bourne shell constructs.
Signed-off-by: Werner Almesberger <werner@openmoko.org>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
scripts/extract-ikconfig | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff -puN scripts/extract-ikconfig~scripts-extract-ikconfig-remove-bashisms scripts/extract-ikconfig
--- a/scripts/extract-ikconfig~scripts-extract-ikconfig-remove-bashisms
+++ a/scripts/extract-ikconfig
@@ -8,8 +8,8 @@ test -e $binoffset || cc -o $binoffset .
IKCFG_ST="0x49 0x4b 0x43 0x46 0x47 0x5f 0x53 0x54"
IKCFG_ED="0x49 0x4b 0x43 0x46 0x47 0x5f 0x45 0x44"
-function dump_config {
- typeset file="$1"
+dump_config() {
+ file="$1"
start=`$binoffset $file $IKCFG_ST 2>/dev/null`
[ "$?" != "0" ] && start="-1"
@@ -18,8 +18,8 @@ function dump_config {
fi
end=`$binoffset $file $IKCFG_ED 2>/dev/null`
- let start="$start + 8"
- let size="$end - $start"
+ start=`expr $start + 8`
+ size=`expr $end - $start`
dd if="$file" ibs=1 skip="$start" count="$size" 2>/dev/null | zcat
_
next reply other threads:[~2008-12-01 22:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-01 22:21 akpm [this message]
2008-12-03 21:29 ` [patch 8/8] scripts/extract-ikconfig: remove bashisms Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200812012221.mB1ML8FS013118@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=sam@ravnborg.org \
--cc=werner@openmoko.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox