scripts/gen_image_generic.sh: remove $ in arithmetic
authorRosen Penev <rosenp@gmail.com>
Mon, 30 Dec 2019 05:07:54 +0000 (21:07 -0800)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Tue, 31 Dec 2019 00:05:27 +0000 (01:05 +0100)
Fixes shellcheck warning:

SC2004: $/${} is unnecessary on arithmetic variables.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
scripts/gen_image_generic.sh

index 2d2fb12..7b642c0 100755 (executable)
@@ -17,7 +17,7 @@ rm -f "$OUTPUT"
 
 head=16
 sect=63
-cyl=$(( ($KERNELSIZE + $ROOTFSSIZE) * 1024 * 1024 / ($head * $sect * 512)))
+cyl=$(( (KERNELSIZE + ROOTFSSIZE) * 1024 * 1024 / (head * sect * 512)))
 
 # create partition table
 set `ptgen -o "$OUTPUT" -h $head -s $sect -p ${KERNELSIZE}m -p ${ROOTFSSIZE}m ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE}`