From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 3/3] apply-patches.sh: don't print anything when "make -s" is used
Date: Fri, 25 Jul 2014 19:45:15 +0200 [thread overview]
Message-ID: <20140725174515.GE3955@free.fr> (raw)
In-Reply-To: <1406306319-11972-4-git-send-email-fabio.porcedda@gmail.com>
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@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@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.:
if [ ${1} == "-s" ]; then
> + # add option to be used by the patch tool
> + silent=-s
> + shift
> +fi
> +
> # Set directories from arguments, or use defaults.
> builddir=${1-.}
> patchdir=${2-../kernel-patches}
> @@ -77,14 +86,16 @@ function apply_patch {
> return 0
> ;;
> esac
> - echo ""
> - echo "Applying $patch using ${type}: "
> + if [[ ! $silent ]] ; then
Ditto:
if [ -z "$silent" ]; then
Otherwise, looks good-to-me. ;-)
Regards,
Yann E. MORIN.
> + echo ""
> + echo "Applying $patch using ${type}: "
> + fi
> if [ ! -e "${path}/$patch" ] ; then
> echo "Error: missing patch file ${path}/$patch"
> exit 1
> fi
> echo $patch >> ${builddir}/.applied_patches_list
> - ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t -N
> + ${uncomp} "${path}/$patch" | patch $silent -g0 -p1 -E -d "${builddir}" -t -N
> if [ $? != 0 ] ; then
> echo "Patch failed! Please fix ${patch}!"
> exit 1
> --
> 2.0.2
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2014-07-25 17:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 16:38 [Buildroot] [PATCH v2 0/3] apply-patches.sh: be quiet when "make -s" is used Fabio Porcedda
2014-07-25 16:38 ` [Buildroot] [PATCH v2 1/3] package/Makefile.in: fix coding style regarding the '=' sign Fabio Porcedda
2014-07-26 7:07 ` Thomas Petazzoni
2014-07-25 16:38 ` [Buildroot] [PATCH v2 2/3] apply-patches.sh: Use the "APPLY_PATCHES" variable to call the script Fabio Porcedda
2014-07-25 17:40 ` Yann E. MORIN
2014-07-28 9:38 ` Fabio Porcedda
2014-07-25 16:38 ` [Buildroot] [PATCH v2 3/3] apply-patches.sh: don't print anything when "make -s" is used Fabio Porcedda
2014-07-25 17:45 ` Yann E. MORIN [this message]
2014-07-26 5:31 ` Thomas De Schampheleire
2014-07-30 16:07 ` Fabio Porcedda
2014-07-31 17:12 ` [Buildroot] [PATCH v2 0/3] apply-patches.sh: be quiet " Fabio Porcedda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140725174515.GE3955@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox