From 5871b791995ebe295db7dca608afe3f293ce8953 Mon Sep 17 00:00:00 2001 From: Arnout Vandecappelle Date: Thu, 22 Aug 2013 20:02:13 +0200 Subject: [PATCH] apply-patches: run patch in batch mode If the file to be patched is missing, then `patch' will interactively ask for a file to be patched. This is annoying in e.g. the autobuilders because they have to wait for a timeout instead of failing. Giving the '-t' (batch mode) option to patch fixes this: it will skip the missing file, and return a non-zero exit code. So the build cleanly fails. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Acked-by: Luca Ceresoli Signed-off-by: Peter Korsgaard --- support/scripts/apply-patches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh index 2995ea9972..e9c68695db 100755 --- a/support/scripts/apply-patches.sh +++ b/support/scripts/apply-patches.sh @@ -80,7 +80,7 @@ function apply_patch { echo "" echo "Applying $patch using ${type}: " echo $patch >> ${builddir}/.applied_patches_list - ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" + ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t if [ $? != 0 ] ; then echo "Patch failed! Please fix ${patch}!" exit 1 -- 2.30.2