Discussion:
[U-Boot] [PATCH] tools: improve portability of imx_cntr_image.sh
Martin Husemann
2018-11-09 13:30:14 UTC
Permalink
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
--
2.19.1
Stefano Babic
2018-12-08 17:37:29 UTC
Permalink
Post by Martin Husemann
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
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: ***@denx.de
=====================================================================
Loading...