support/download: further silence the git helper
PATCH 1/1 support/download: further silence the git helper
We expresely call printf in the git helper, calls which were not addresed in the previous silent-build patchset.
Just redirect stdout to oblivion when being silent.
--- support/download/git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
support/download/git +1 -1
@@ -14,7 +14,7 @@ set -e verbose=-v while getopts :q OPT; do case "${OPT}" in - q) verbose=-q;; + q) verbose=-q; exec >/dev/null;; \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; esac done
Signature · 1 line
1.9.1
PATCH 1/1 support/download: further silence the git helper
Quoted 17 lines · Yann E. MORIN
We expresely call printf in the git helper, calls which were not addresed in the previous silent-build patchset.
Just redirect stdout to oblivion when being silent.
Reported-by Thomas Petazzoni <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>--- support/download/git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)support/download/git +0
-0
support/download/git set -e · line 17
Quoted 5 lines
support/download/git +1
-1@@ -14,7 +14,7 @@ set -e verbose=-v while getopts :q OPT; do case "${OPT}" in - q) verbose=-q;; + q) verbose=-q; exec >/dev/null;;
As general rule It's best to use "&&" instead of ";" so any error can be caught, otherwise is:
BR
Signature · 1 line
Fabio Porcedda
PATCH 1/1 support/download: further silence the git helper
Fabio, All,
On 2015-01-05 12:35 +0100, Fabio Porcedda spake thusly:
Quoted 13 lines · Yann E. MORIN
Quoted 12 lines
We expresely call printf in the git helper, calls which were not addresed in the previous silent-build patchset.
Just redirect stdout to oblivion when being silent.
Reported-by Thomas Petazzoni <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>--- support/download/git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines
support/download/git set -e · line 17
Quoted 10 lines
support/download/git +1
-1@@ -14,7 +14,7 @@ set -e verbose=-v while getopts :q OPT; do case "${OPT}" in - q) verbose=-q;; + q) verbose=-q; exec >/dev/null;;As general rule It's best to use "&&" instead of ";" so any error can be caught,
That is really not necessary, because the backend scripts are all 'set -e', so they exit on the first error that occurs.
Besides, even if they were not 'set -e', then the '&&' construct would not catch the error at all, and the script would continue without redirecting.
Furthermore, in that case, we're doing two things:
- set a variable
- redirect stdout to /dev/null
If either were to fail, you would have a hell of a bigger problem:
- unable to set a variable: big problem in the shell
- not able to redirect: /dev/null does not exist, or you do not have the rights to write to it.
In either case, this would be a really, *really* big problem, which I doubt we should care about. ;-)
Quoted 3 lines
otherwise is:
Acked-by Fabio Porcedda <[email protected]>Tested-by Fabio Porcedda <[email protected]>
Thanks!
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
Thomas Petazzoni
AppliedPATCH 1/1 support/download: further silence the git helper
In reply to Yann E. MORINDear Yann E. MORIN,
Quoted 8 lines · Yann E. MORIN
We expresely call printf in the git helper, calls which were not addresed in the previous silent-build patchset.
Just redirect stdout to oblivion when being silent.
Reported-by Thomas Petazzoni <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>
Applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com