[Buildroot] [PATCH v2 3/3] apply-patches.sh: don't print anything when "make -s" is used

Fabio Porcedda fabio.porcedda at gmail.com
Wed Jul 30 16:07:19 UTC 2014


On Sat, Jul 26, 2014 at 7:31 AM, Thomas De Schampheleire
<patrickdepinguin at gmail.com> wrote:
> "Yann E. MORIN" <yann.morin.1998 at free.fr> schreef:
>>Fabio, All,
>>
>>On 2014-07-25 18:38 +0200, Fabio Porcedda spake thusly:
>>> The make "-s" option is used to enable the "Silent operation" so if that
>>> option is used don't print anything as far as there isn't any error.
>>>
>>> Add the "-s" option to "apply-patches.sh" to enable silent operation.
>>>
>>> Also add the "BR_SILENT" variable the contain "YES" when "make -s" is
>>> used so others parts can use it to silence the build as well.
>>>
>>> Signed-off-by: Fabio Porcedda <fabio.porcedda at gmail.com>
>>[--SNIP--]
>>> diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
>>> index 37f2d81..8d4ba6d 100755
>>> --- a/support/scripts/apply-patches.sh
>>> +++ b/support/scripts/apply-patches.sh
>>> @@ -6,6 +6,8 @@
>>>  # (c) 2002 Erik Andersen <andersen at codepoet.org>
>>>  #
>>>  # Parameters:
>>> +# - "-s",optional. Silent operation, don't print anything if there
>>> +# isn't any error.
>>>  # - the build directory, optional, default value is '.'. The place where are
>>>  # the package sources.
>>>  # - the patch directory, optional, default '../kernel-patches'. The place
>>> @@ -28,6 +30,13 @@
>>>  # applied. The list of the patches applied is stored in '.applied_patches_list'
>>>  # file in the build directory.
>>>
>>> +silent=
>>> +if [[ $1 == "-s" ]] ; then
>>
>>The script uses single-[ tests, so please stay aligned with that. E.g.:

Because the "[[ ]]" operator is a safer improvement on the "[ ]" i
prefer to use the "[[ ]]" operator, so for sake of consistency i
prefer to do another patch to convert all tests to use the better "[[
]]" operator.

>>    if [ ${1} == "-s" ]; then
>
> In standard 'test' this should then also be a single = sign.
>

Thanks, I've discovered only now that i can use the single "=" sign
with both operators.

Thanks & BR
-- 
Fabio Porcedda



More information about the buildroot mailing list