octeon: replace backticks by $(...)
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 24 Jul 2019 22:50:26 +0000 (00:50 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 28 Sep 2019 22:46:13 +0000 (00:46 +0200)
This replaces deprecated backticks by more versatile $(...) syntax.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[decapitalized patch subject at submitter's request]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
target/linux/octeon/base-files/lib/upgrade/platform.sh

index 4d0047bceba79a6d813010a74c6e367a7c56a0d3..149c2fd955c0417d3fa790458d7f1e47a44b58c6 100755 (executable)
@@ -85,8 +85,8 @@ platform_check_image() {
        er | \
        erlite)
                local tar_file="$1"
-               local kernel_length=`(tar xf $tar_file sysupgrade-$board/kernel -O | wc -c) 2> /dev/null`
-               local rootfs_length=`(tar xf $tar_file sysupgrade-$board/root -O | wc -c) 2> /dev/null`
+               local kernel_length=$((tar xf $tar_file sysupgrade-$board/kernel -O | wc -c) 2> /dev/null)
+               local rootfs_length=$((tar xf $tar_file sysupgrade-$board/root -O | wc -c) 2> /dev/null)
                [ "$kernel_length" = 0 -o "$rootfs_length" = 0 ] && {
                        echo "The upgrade image is corrupt."
                        return 1