diff options
author | Dave Martin <Dave.Martin@arm.com> | 2019-06-07 12:26:23 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2019-07-03 10:34:05 +0100 |
commit | 9f520be560cba627e30b5193697f506f69afc861 (patch) | |
tree | abda147fca6d525d97d516c58c5832172ff4e10c | |
parent | 3baf13c790407140007025a18642f61168768fb8 (diff) | |
download | kvmtool-9f520be560cba627e30b5193697f506f69afc861.tar.gz |
update_headers.sh: Cleanly report failure on error
If in intermediate step fails, update_headers.sh blindly continues
and may return success status.
To avoid errors going unnoticed when driving this script, exit and
report failure status as soon as something goes wrong. For good
measure, also fail on expansion of undefined shell variables to aid
future maintainers.
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rwxr-xr-x | util/update_headers.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/update_headers.sh b/util/update_headers.sh index 4ba1b9f8..a7e21b8f 100755 --- a/util/update_headers.sh +++ b/util/update_headers.sh @@ -7,6 +7,8 @@ # using the lib/modules/`uname -r`/source link. ######################################################################## +set -ue + if [ "$#" -ge 1 ] then LINUX_ROOT="$1" |