public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 8/8] scripts/extract-ikconfig: remove bashisms
@ 2008-12-01 22:21 akpm
  2008-12-03 21:29 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2008-12-01 22:21 UTC (permalink / raw)
  To: sam; +Cc: linux-kbuild, akpm, werner, randy.dunlap

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
 
_

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

* Re: [patch 8/8] scripts/extract-ikconfig: remove bashisms
  2008-12-01 22:21 [patch 8/8] scripts/extract-ikconfig: remove bashisms akpm
@ 2008-12-03 21:29 ` Sam Ravnborg
  0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2008-12-03 21:29 UTC (permalink / raw)
  To: akpm; +Cc: linux-kbuild, werner, randy.dunlap

On Mon, Dec 01, 2008 at 02:21:08PM -0800, akpm@linux-foundation.org wrote:
> 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>

Already applied - soon to appear in -next.

	Sam

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

end of thread, other threads:[~2008-12-03 21:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-01 22:21 [patch 8/8] scripts/extract-ikconfig: remove bashisms akpm
2008-12-03 21:29 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox