[RFC 4/5] script/carry.sh: send error to stderr
Anup Patel
anup at brainfault.org
Sun Dec 15 00:23:45 PST 2024
On Mon, Dec 2, 2024 at 4:38 PM Ben Dooks <ben.dooks at codethink.co.uk> wrote:
>
> Send the errors to stderr, otherwise they end up being
> written to the file the script was redirecting to in the
> Makefile
>
> Also, use EOF block to make it easier to redirect
>
> Signed-off-by: Ben Dooks <ben.dooks at codethink.co.uk>
Applied this patch to the riscv/opensbi repo.
Thanks,
Anup
> ---
> scripts/carray.sh | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/carray.sh b/scripts/carray.sh
> index fb985c8..a2b05d3 100755
> --- a/scripts/carray.sh
> +++ b/scripts/carray.sh
> @@ -2,12 +2,14 @@
>
> function usage()
> {
> - echo "Usage:"
> - echo " $0 [options]"
> - echo "Options:"
> - echo " -h Display help or usage"
> - echo " -i <input_config> Input config file"
> - echo " -l <variable_list> List of variables in the array (Optional)"
> + cat <<EOF >&2
> +Usage: $0 [options]
> +
> +Options:
> + -h Display help or usage
> + -i <input_config> Input config file
> + -l <variable_list> List of variables in the array (Optional)
> +EOF
> exit 1;
> }
>
> --
> 2.37.2.352.g3c44437643
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi
More information about the opensbi
mailing list