summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-07-17 18:29:37 +0100
committerSaul Wold <sgw@linux.intel.com>2013-07-18 12:21:13 -0700
commitd509739ca54e6b70f2dcc216b831fc02c64293a6 (patch)
treee3fec197909d04ab1a30c23098ba499cb20062f9 /scripts
parentd9d62e05dba88c1f9f464367d49c1b290bfaea95 (diff)
downloadopenembedded-core-d509739ca54e6b70f2dcc216b831fc02c64293a6.tar.gz
openembedded-core-d509739ca54e6b70f2dcc216b831fc02c64293a6.tar.bz2
openembedded-core-d509739ca54e6b70f2dcc216b831fc02c64293a6.zip
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/contrib/ddimage2
-rwxr-xr-xscripts/contrib/mkefidisk.sh2
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() {
echo " model: UNKNOWN"
fi
if [ -f "/sys/class/block/$DEV/size" ]; then
- echo " size: $[$(cat /sys/class/block/$DEV/size)*BLOCK_SIZE] bytes"
+ echo " size: $(($(cat /sys/class/block/$DEV/size) * $BLOCK_SIZE)) bytes"
else
echo " size: UNKNOWN"
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() {
echo " model: UNKNOWN"
fi
if [ -f "/sys/class/block/$DEV/size" ]; then
- echo " size: $[$(cat /sys/class/block/$DEV/size)*BLOCK_SIZE] bytes"
+ echo " size: $(($(cat /sys/class/block/$DEV/size) * $BLOCK_SIZE)) bytes"
else
echo " size: UNKNOWN"
fi