diff options
author | Werner Almesberger <werner@openmoko.org> | 2008-11-12 13:39:35 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2008-12-03 15:32:02 -0500 |
commit | efddd79512cc582675004bfdf7e66585198b38f9 (patch) | |
tree | 34c555f0c685d667d5b8c0ab00aee35e83dc032f /scripts/extract-ikconfig | |
parent | d2301249e2f9b9a3ba989703107192b538209e57 (diff) |
remove bashisms from scripts/extract-ikconfig
unbashify-extract-ikconfig.patch
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>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com> # as file author
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/extract-ikconfig')
-rwxr-xr-x | scripts/extract-ikconfig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig index 8187e6f0dc2f..72997c353cb3 100755 --- a/scripts/extract-ikconfig +++ b/scripts/extract-ikconfig | |||
@@ -8,8 +8,8 @@ test -e $binoffset || cc -o $binoffset ./scripts/binoffset.c || exit 1 | |||
8 | 8 | ||
9 | IKCFG_ST="0x49 0x4b 0x43 0x46 0x47 0x5f 0x53 0x54" | 9 | IKCFG_ST="0x49 0x4b 0x43 0x46 0x47 0x5f 0x53 0x54" |
10 | IKCFG_ED="0x49 0x4b 0x43 0x46 0x47 0x5f 0x45 0x44" | 10 | IKCFG_ED="0x49 0x4b 0x43 0x46 0x47 0x5f 0x45 0x44" |
11 | function dump_config { | 11 | dump_config() { |
12 | typeset file="$1" | 12 | file="$1" |
13 | 13 | ||
14 | start=`$binoffset $file $IKCFG_ST 2>/dev/null` | 14 | start=`$binoffset $file $IKCFG_ST 2>/dev/null` |
15 | [ "$?" != "0" ] && start="-1" | 15 | [ "$?" != "0" ] && start="-1" |
@@ -18,8 +18,8 @@ function dump_config { | |||
18 | fi | 18 | fi |
19 | end=`$binoffset $file $IKCFG_ED 2>/dev/null` | 19 | end=`$binoffset $file $IKCFG_ED 2>/dev/null` |
20 | 20 | ||
21 | let start="$start + 8" | 21 | start=`expr $start + 8` |
22 | let size="$end - $start" | 22 | size=`expr $end - $start` |
23 | 23 | ||
24 | dd if="$file" ibs=1 skip="$start" count="$size" 2>/dev/null | zcat | 24 | dd if="$file" ibs=1 skip="$start" count="$size" 2>/dev/null | zcat |
25 | 25 | ||