Re: [PATCH] Remove "bashism" from contrib/thunderbird-patch-inline/appp.sh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Thank you very much for the suggestions. However, I have tested this
script in Ubuntu which uses dash as /bin/sh

Eg: the following script runs successfully in Ubuntu 10.10

#!/bin/dash

PATCH=$(zenity --file-selection)

if [ "$?" != "0" ] ; then
 echo "zenity failed"
else
 echo "success"
fi

I haven't confirmed this in other shell implementations. Please let me
know your comments on this.

Best Regards,
Maxin B. John

2011/3/29 Ángel González <ingenit@xxxxxxxx>:
> Maxin john wrote:
>> Remove "bashism" and minor corrections for
>> contrib/thunderbird-patch-inline/appp.sh
>>
>> Signed-off-by: Maxin B. John <maxin@xxxxxxxxxxxxxxx>
>
> This is wrong.
>
> You are replacing bash with sh:
>> -#!/bin/bash
>> +#!/bin/sh
>
> but the script still uses bash-specific syntax (aka. bashishms):
>> +
>>  PATCH=$(zenity --file-selection)
>>
>>  if [ "$?" != "0" ] ; then
>
> So with your change the script won't be able to run on systems which
> don't have bash as /bin/sh
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]