Skip to content

Commit efddd79

Browse files
Werner Almesbergersravnborg
authored andcommitted
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>
1 parent d230124 commit efddd79

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎scripts/extract-ikconfig‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ test -e $binoffset || cc -o $binoffset ./scripts/binoffset.c || exit 1
88

99
IKCFG_ST="0x49 0x4b 0x43 0x46 0x47 0x5f 0x53 0x54"
1010
IKCFG_ED="0x49 0x4b 0x43 0x46 0x47 0x5f 0x45 0x44"
11-
function dump_config {
12-
typeset file="$1"
11+
dump_config() {
12+
file="$1"
1313

1414
start=`$binoffset $file $IKCFG_ST 2>/dev/null`
1515
[ "$?" != "0" ] && start="-1"
@@ -18,8 +18,8 @@ function dump_config {
1818
fi
1919
end=`$binoffset $file $IKCFG_ED 2>/dev/null`
2020

21-
let start="$start + 8"
22-
let size="$end - $start"
21+
start=`expr $start + 8`
22+
size=`expr $end - $start`
2323

2424
dd if="$file" ibs=1 skip="$start" count="$size" 2>/dev/null | zcat
2525

0 commit comments

Comments
 (0)