[LEDE-DEV] [PATCH] ct-bugcheck: fix globbing, word splitting and change formatting
John Crispin
john at phrozen.org
Sat Oct 15 00:17:55 PDT 2016
On 14/10/2016 18:03, Ben Greear wrote:
> On 10/14/2016 08:58 AM, Jan-Tarek Butt wrote:
>> Double quote to prevent globbing and word splitting.
>> Use short syntax to enhance reading quallity.
>
> I disagree that the short syntax helps reading quality,
> but if others like it then I guess that change is fine with me.
>
> Thanks,
> Ben
>
this patch looks wonky. i agree with ben here, that the style long vs
short style only makes a readability difference for some and reduces
readability for others. additionally the == is changed to -eq yet the
value compared to changes from integer to string by adding the quotes
around 0. the change to the while loop is also not related. i understand
the reasoning behind jan-tareks patches, but for most of it i dont see
the point. might be better to simply concentrate on the word globbing
issue and not make lots of small unrelated formatting changes in the
patches.
John
>>
>> Signed-off-by: Jan-Tarek Butt <tarek at ring0.de>
>> ---
>> package/utils/ct-bugcheck/src/bugchecker.sh | 14 +++-----------
>> 1 file changed, 3 insertions(+), 11 deletions(-)
>>
>> diff --git a/package/utils/ct-bugcheck/src/bugchecker.sh
>> b/package/utils/ct-bugcheck/src/bugchecker.sh
>> index be305af..eb221db 100755
>> --- a/package/utils/ct-bugcheck/src/bugchecker.sh
>> +++ b/package/utils/ct-bugcheck/src/bugchecker.sh
>> @@ -12,18 +12,10 @@ DO_BUGCHECK=0
>> # DO_BUGCHECK=1
>> # export DO_BUGCHECK
>>
>> -if [ -f /etc/config/bugcheck ]
>> - then
>> - . /etc/config/bugcheck
>> -fi
>> +[ -f /etc/config/bugcheck ] && . /etc/config/bugcheck
>> +[ "$DO_BUGCHECK" -eq "0" ] && exit 0
>>
>> -if [ $DO_BUGCHECK == 0 ]
>> -then
>> - exit 0
>> -fi
>> -
>> -while true
>> - do
>> +while true; do
>> $CHECKER
>> sleep $SLEEPFOR
>> done
>>
>
>
More information about the Lede-dev
mailing list