aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRabin Vincent <rabin@rab.in>2010-06-03 13:18:12 -0400
committerMichal Marek <mmarek@suse.cz>2010-06-04 04:26:35 -0400
commitb396aa03084b51f6822052a8070703287f198360 (patch)
tree6e7f018bb8aabcbab90a854e4da49fdff00db97b
parentc8447161470d0292cc96b4f28f03a8eedb7806e9 (diff)
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>
-rwxr-xr-xscripts/decodecode10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/decodecode b/scripts/decodecode
index 8b30cc36744f..18ba881c3415 100755
--- a/scripts/decodecode
+++ b/scripts/decodecode
@@ -40,7 +40,7 @@ echo $code
40code=`echo $code | sed -e 's/.*Code: //'` 40code=`echo $code | sed -e 's/.*Code: //'`
41 41
42width=`expr index "$code" ' '` 42width=`expr index "$code" ' '`
43width=$[($width-1)/2] 43width=$((($width-1)/2))
44case $width in 44case $width in
451) type=byte ;; 451) type=byte ;;
462) type=2byte ;; 462) type=2byte ;;
@@ -48,10 +48,10 @@ case $width in
48esac 48esac
49 49
50disas() { 50disas() {
51 ${CROSS_COMPILE}as $AFLAGS -o $1.o $1.s &> /dev/null 51 ${CROSS_COMPILE}as $AFLAGS -o $1.o $1.s > /dev/null 2>&1
52 52
53 if [ "$ARCH" == "arm" ]; then 53 if [ "$ARCH" = "arm" ]; then
54 if [ $width == 2 ]; then 54 if [ $width -eq 2 ]; then
55 OBJDUMPFLAGS="-M force-thumb" 55 OBJDUMPFLAGS="-M force-thumb"
56 fi 56 fi
57 57
@@ -59,7 +59,7 @@ disas() {
59 fi 59 fi
60 60
61 ${CROSS_COMPILE}objdump $OBJDUMPFLAGS -S $1.o | \ 61 ${CROSS_COMPILE}objdump $OBJDUMPFLAGS -S $1.o | \
62 grep -v "/tmp\|Disassembly\|\.text\|^$" &> $1.dis 62 grep -v "/tmp\|Disassembly\|\.text\|^$" > $1.dis 2>&1
63} 63}
64 64
65marker=`expr index "$code" "\<"` 65marker=`expr index "$code" "\<"`