[Buildroot] [RFC PATCH v4 2/2] apply-patches.sh check if they are rejects before applying patches

ludovic.desroches at atmel.com ludovic.desroches at atmel.com
Tue Jan 10 18:01:56 UTC 2012


From: Ludovic Desroches <ludovic.desroches at atmel.com>

If we don't do it, the rejects' check at the end of the script can complain
about rejects not deleted by the user from a previous try.

Signed-off-by: Ludovic Desroches <ludovic.desroches at atmel.com>
---
 support/scripts/apply-patches.sh |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
index 2a25606..a15b5c1 100755
--- a/support/scripts/apply-patches.sh
+++ b/support/scripts/apply-patches.sh
@@ -64,6 +64,13 @@ if [ ! -d "${builddir}" ] ; then
 	echo "Aborting: ${builddir} is not a directory."
 	exit 1
 fi
+# check for rejects because if there are some, even if patches are well
+# applied, at the end it will complain about rejects into buildir
+if [ "`find ${builddir}/ '(' -name '*.rej' -o -name '.*.rej' ')' -print`" ] ; then
+    echo "There are remaining rejecting file into ${buildir}, please delete them"
+    exit 1
+fi
+
 
 # Parse patch list, extract archives, apply patches
 for i in $patchlist ; do
-- 
1.7.5.4



More information about the buildroot mailing list