diff mbox series

[U-Boot] tools: improve portability of imx_cntr_image.sh

Message ID 20181109133014.GB21976@mail.duskware.de
State Accepted
Commit 757ab988e44892dee6df4cc2a2a36f74eb6d73a6
Delegated to: Stefano Babic
Headers show
Series [U-Boot] tools: improve portability of imx_cntr_image.sh | expand

Commit Message

Martin Husemann Nov. 9, 2018, 1:30 p.m. UTC
Replace non-portable operator == with =

The operator == in sh(1) / test(1) is non-POSIX and only implemented by
some shells (like bash). It is equivalent to the standard defined operator =.

---
 tools/imx_cntr_image.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Babic Dec. 8, 2018, 5:37 p.m. UTC | #1
On 09/11/18 14:30, Martin Husemann wrote:
> Replace non-portable operator == with =
> 
> The operator == in sh(1) / test(1) is non-POSIX and only implemented by
> some shells (like bash). It is equivalent to the standard defined operator =.
> 
> ---
>  tools/imx_cntr_image.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/imx_cntr_image.sh b/tools/imx_cntr_image.sh
> index 4c629e8694..972b95ccbe 100755
> --- a/tools/imx_cntr_image.sh
> +++ b/tools/imx_cntr_image.sh
> @@ -10,7 +10,7 @@ file=$1
>  blobs=`awk '/^APPEND/ {print $2} /^IMAGE/ || /^DATA/ {print $3}' $file`
>  for f in $blobs; do
>  	tmp=$srctree/$f
> -	if [ $f == "u-boot-dtb.bin" ]; then
> +	if [ $f = "u-boot-dtb.bin" ]; then
>  		continue
>  	fi
>  
> 

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/tools/imx_cntr_image.sh b/tools/imx_cntr_image.sh
index 4c629e8694..972b95ccbe 100755
--- a/tools/imx_cntr_image.sh
+++ b/tools/imx_cntr_image.sh
@@ -10,7 +10,7 @@  file=$1
 blobs=`awk '/^APPEND/ {print $2} /^IMAGE/ || /^DATA/ {print $3}' $file`
 for f in $blobs; do
 	tmp=$srctree/$f
-	if [ $f == "u-boot-dtb.bin" ]; then
+	if [ $f = "u-boot-dtb.bin" ]; then
 		continue
 	fi