[OpenWrt-Devel,v2] octeon: Replace backticks by $(...)
diff mbox series

Message ID 20190724225026.35856-1-freifunk@adrianschmutzler.de
State New
Headers show
Series
  • [OpenWrt-Devel,v2] octeon: Replace backticks by $(...)
Related show

Commit Message

Adrian Schmutzler July 24, 2019, 10:50 p.m. UTC
This replaces deprecated backticks by more versatile $(...) syntax.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

---

Fix accidental remove of subshell.
---
 target/linux/octeon/base-files/lib/upgrade/platform.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Adrian Schmutzler July 25, 2019, 8:23 a.m. UTC | #1
Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
> On Behalf Of Adrian Schmutzler
> Sent: Donnerstag, 25. Juli 2019 00:50
> To: openwrt-devel@lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH v2] octeon: Replace backticks by $(...)

sorry, I forgot to decapitalize the commit title for all those v2 patches.

However, I don't think it's worth sending a v3 only for that.

You may just change it during merge within my Signed-off if you like.

Best

Adrian

Patch
diff mbox series

diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh b/target/linux/octeon/base-files/lib/upgrade/platform.sh
index 0e4ca37629..1c08489dc4 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -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