[OpenWrt-Devel] [PATCH 02/10] base-files: replace backticks by $(...)

mail at adrianschmutzler.de mail at adrianschmutzler.de
Sun May 10 12:00:34 EDT 2020


> -	local rootfs_length=`(cat $1 | wc -c) 2> /dev/null`
> +	local rootfs_length=$((cat $1 | wc -c) 2> /dev/null)
> 
>  	nand_upgrade_prepare_ubi "$rootfs_length" "ubifs" "0" "0"
> 
> @@ -249,8 +249,8 @@ nand_upgrade_tar() {
>  	local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
>  	board_dir=${board_dir%/}
> 
> -	local kernel_length=`(tar xf $tar_file ${board_dir}/kernel -O | wc -c)
> 2> /dev/null`
> -	local rootfs_length=`(tar xf $tar_file ${board_dir}/root -O | wc -c) 2>
> /dev/null`
> +	local kernel_length=$((tar xf $tar_file ${board_dir}/kernel -O | wc -c)
> 2> /dev/null)
> +	local rootfs_length=$((tar xf $tar_file ${board_dir}/root -O | wc -c)
> +2> /dev/null)

This won't work, as discussed here:

https://github.com/openwrt/openwrt/commit/291d79935e9c4a974b037b6bed733ce92d4242e3#diff-a6a780f4082e88756e922a1f3ec5e2ab

Will send an updated version. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200510/f1f04bed/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list