lkml.org 
[lkml]   [2015]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/45] headers_install.sh: enhance error handling
On 2015-02-17 00:05, Mikko Rapeli wrote:
> Exit with error if using undefined variables or if any sub command fails
> with error return value. unidef needs special handling since but this can
> be done without the trap. Enables exaniming intermediate files if some
> commands failed.

The intermediate files are removed by your patch as well, aren't they?
Actually, I don't see any change in behavior after your patch.


> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> ---
> scripts/headers_install.sh | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh
> index fdebd66..072f7d3 100755
> --- a/scripts/headers_install.sh
> +++ b/scripts/headers_install.sh
> @@ -1,4 +1,7 @@
> #!/bin/sh
> +set -e
> +set -u
> +#set -x

The commented-out statement should be removed.

Michal


\
 
 \ /
  Last update: 2015-02-17 14:41    [W:1.899 / U:0.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site