diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-07-17 18:29:37 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-07-18 21:25:35 +0100 |
commit | 7156f30ac32b9bb7718cedf12e868d3e0e0514bc (patch) | |
tree | 1a1933de1f8ec491099e9e618c1a8019462b6ff8 /scripts | |
parent | 5a170bd4baaaa3b8f28b38b49e0ba4818e4c1aea (diff) | |
download | poky-7156f30ac32b9bb7718cedf12e868d3e0e0514bc.tar.gz |
scripts/contrib/*: fix arithmetic bashism
Apparently $[...] isn't valid in dash, so use $((...)) instead for
mkefidisk.sh and ddimage that both start with $!/bin/sh.
(From OE-Core rev: d509739ca54e6b70f2dcc216b831fc02c64293a6)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/contrib/ddimage | 2 | ||||
-rwxr-xr-x | scripts/contrib/mkefidisk.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/contrib/ddimage b/scripts/contrib/ddimage index ab1d4c7b10..93ebeafc31 100755 --- a/scripts/contrib/ddimage +++ b/scripts/contrib/ddimage | |||
@@ -39,7 +39,7 @@ device_details() { | |||
39 | echo " model: UNKNOWN" | 39 | echo " model: UNKNOWN" |
40 | fi | 40 | fi |
41 | if [ -f "/sys/class/block/$DEV/size" ]; then | 41 | if [ -f "/sys/class/block/$DEV/size" ]; then |
42 | echo " size: $[$(cat /sys/class/block/$DEV/size)*BLOCK_SIZE] bytes" | 42 | echo " size: $(($(cat /sys/class/block/$DEV/size) * $BLOCK_SIZE)) bytes" |
43 | else | 43 | else |
44 | echo " size: UNKNOWN" | 44 | echo " size: UNKNOWN" |
45 | fi | 45 | fi |
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh index 0c15104bb3..bcc2411ca2 100755 --- a/scripts/contrib/mkefidisk.sh +++ b/scripts/contrib/mkefidisk.sh | |||
@@ -64,7 +64,7 @@ function device_details() { | |||
64 | echo " model: UNKNOWN" | 64 | echo " model: UNKNOWN" |
65 | fi | 65 | fi |
66 | if [ -f "/sys/class/block/$DEV/size" ]; then | 66 | if [ -f "/sys/class/block/$DEV/size" ]; then |
67 | echo " size: $[$(cat /sys/class/block/$DEV/size)*BLOCK_SIZE] bytes" | 67 | echo " size: $(($(cat /sys/class/block/$DEV/size) * $BLOCK_SIZE)) bytes" |
68 | else | 68 | else |
69 | echo " size: UNKNOWN" | 69 | echo " size: UNKNOWN" |
70 | fi | 70 | fi |