From: Romain Naour Date: Tue, 5 Jul 2016 11:02:09 +0000 (+0200) Subject: apply-patches: catch unexpected failure X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9cf1ad6cdb37c5be5772121896f4b13ec42c2b0d;p=buildroot.git apply-patches: catch unexpected failure As reported by Sébastien Szymanski [1], the apply-patches script doesn't stop if a tar command can't extract an archive. Use "set -e" to exit immediately if a command return an error. [1] http://patchwork.ozlabs.org/patch/626196 Signed-off-by: Romain Naour Cc: Sébastien Szymanski Signed-off-by: Thomas Petazzoni --- diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh index 694302d33e..11fa5bf68b 100755 --- a/support/scripts/apply-patches.sh +++ b/support/scripts/apply-patches.sh @@ -31,6 +31,9 @@ # applied. The list of the patches applied is stored in '.applied_patches_list' # file in the build directory. +# We want to catch any unexpected failure, and exit immediately. +set -e + silent= if [ "$1" = "-s" ] ; then # add option to be used by the patch tool