Skip to contentSkip to conversation

Portability of sh scripts

U-Boot Martin Husemann 2 participants 2 messages Nov 9, 2018

lore
Share & tools
lore
#0 lore raw

Hey folks,

I noticed that tools/imx_cntr_image.sh contains non-portable code:

	if [ $f == "u-boot-dtb.bin" ]; then

This is a "bash-ism", the operator "==" is not implemented by most test(1) or sh(1) impmlementations. Simply replacing it with "=" fixes this.

Should I send a trivial patch or do you just fix it?

Thanks,

Martin

#1 lore raw
Quoted 10 lines · Martin Husemann

Hey folks,

I noticed that tools/imx_cntr_image.sh contains non-portable code:

	if [ $f == "u-boot-dtb.bin" ]; then

This is a "bash-ism", the operator "==" is not implemented by most test(1) or sh(1) impmlementations. Simply replacing it with "=" fixes this.

Should I send a trivial patch or do you just fix it?

Please send a patch, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181109/7a981e59/attachment.sig>