[LEDE-DEV] [patch master 11/15] Consider using { cmd1; cmd2; } >> file instead of individual redirects
Lars Kruse
lists at sumpfralle.de
Fri Sep 30 15:33:49 PDT 2016
Hi Jan-Tarek,
Am Fri, 30 Sep 2016 22:02:25 +0200
schrieb Jan-Tarek Butt <tarek at ring0.de>:
> ---
> scripts/config/lxdialog/check-lxdialog.sh | 16 +++++++-----
> scripts/diffconfig.sh | 16 +++++++-----
> scripts/ext-toolchain.sh | 43
> +++++++++++++++++-------------- 3 files changed, 42 insertions(+), 33
> deletions(-)
>
> diff --git a/scripts/config/lxdialog/check-lxdialog.sh
> b/scripts/config/lxdialog/check-lxdialog.sh index 5075ebf..02f05ad 100644
> --- a/scripts/config/lxdialog/check-lxdialog.sh
> +++ b/scripts/config/lxdialog/check-lxdialog.sh
> @@ -50,13 +50,15 @@ check() {
> main() {}
> EOF
> if [ $? != 0 ]; then
> - echo " *** Unable to find the ncurses libraries or the"
> 1>&2
> - echo " *** required header files."
> 1>&2
> - echo " *** 'make menuconfig' requires the ncurses libraries."
> 1>&2
> - echo " *** "
> 1>&2
> - echo " *** Install ncurses (ncurses-devel) and try again."
> 1>&2
> - echo " *** "
> 1>&2
> - exit 1
> + {
> + echo " *** Unable to find the ncurses libraries or
> the"
> + echo " *** required header files."
> + echo " *** 'make menuconfig' requires the ncurses
> libraries."
> + echo " ***"
> + echo " *** Install ncurses (ncurses-devel) and try
> again."
> + echo " ***"
> + } 1>&2
> + exit 1
personally I would move the first line of the output into the braces and change
">>" into ">". I think, this would improve readability here.
Just a thought ...
Lars
More information about the Lede-dev
mailing list