2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-17 15:14:35 +08:00

scripts: decodecode: remove bashisms

Remove bashisms to make scripts/decodecode work with other shells.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
Rabin Vincent 2010-06-03 22:48:12 +05:30 committed by Michal Marek
parent c844716147
commit b396aa0308

View File

@ -40,7 +40,7 @@ echo $code
code=`echo $code | sed -e 's/.*Code: //'` code=`echo $code | sed -e 's/.*Code: //'`
width=`expr index "$code" ' '` width=`expr index "$code" ' '`
width=$[($width-1)/2] width=$((($width-1)/2))
case $width in case $width in
1) type=byte ;; 1) type=byte ;;
2) type=2byte ;; 2) type=2byte ;;
@ -48,10 +48,10 @@ case $width in
esac esac
disas() { disas() {
${CROSS_COMPILE}as $AFLAGS -o $1.o $1.s &> /dev/null ${CROSS_COMPILE}as $AFLAGS -o $1.o $1.s > /dev/null 2>&1
if [ "$ARCH" == "arm" ]; then if [ "$ARCH" = "arm" ]; then
if [ $width == 2 ]; then if [ $width -eq 2 ]; then
OBJDUMPFLAGS="-M force-thumb" OBJDUMPFLAGS="-M force-thumb"
fi fi
@ -59,7 +59,7 @@ disas() {
fi fi
${CROSS_COMPILE}objdump $OBJDUMPFLAGS -S $1.o | \ ${CROSS_COMPILE}objdump $OBJDUMPFLAGS -S $1.o | \
grep -v "/tmp\|Disassembly\|\.text\|^$" &> $1.dis grep -v "/tmp\|Disassembly\|\.text\|^$" > $1.dis 2>&1
} }
marker=`expr index "$code" "\<"` marker=`expr index "$code" "\<"`