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 2d2fb120ceadabc389ad76ca36e027f30262fef6..7b642c00d6437fcc73bcd97448f67febc1ab5062 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}`