From 39bd61c6f30e3d9548b5928488fcd9ccfb3fda70 Mon Sep 17 00:00:00 2001 From: Ludovic Desroches Date: Wed, 14 Mar 2012 16:33:52 +0100 Subject: apply-patches.sh: remove any rejects before applying patches [Peter: .rej files might be in subdirs, so just do find .. | xargs rm] Signed-off-by: Ludovic Desroches Tested-by: Ludovic Desroches with an armadeus_apf9328_defconfig build Reviewed-by: Arnout Vandecappelle (Essensium/Mind) Acked-by: Thomas Petazzoni Tested-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- support/scripts/apply-patches.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'support') diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh index 1aef47ebf..e418cb6ec 100755 --- a/support/scripts/apply-patches.sh +++ b/support/scripts/apply-patches.sh @@ -19,7 +19,13 @@ if [ ! -d "${patchdir}" ] ; then echo "Aborting. '${patchdir}' is not a directory." exit 1 fi - + +# Remove any rejects present BEFORE patching - Because if there are +# any, even if patches are well applied, at the end it will complain +# about rejects in targetdir. +find ${targetdir}/ '(' -name '*.rej' -o -name '.*.rej' ')' -print0 | \ + xargs -0 -r rm -f + for i in `cd ${patchdir}; ls -d ${patchpattern} 2> /dev/null` ; do apply="patch -g0 -p1 -E -d" uncomp_parm="" -- cgit v1.2.3