diff options
Diffstat (limited to 'support/scripts/apply-patches.sh')
-rwxr-xr-x | support/scripts/apply-patches.sh | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh index 66fef262ee..9fb488c570 100755 --- a/support/scripts/apply-patches.sh +++ b/support/scripts/apply-patches.sh @@ -113,13 +113,13 @@ function apply_patch { echo " to be applied : ${path}/${patch}" exit 1 fi - if grep -q "^rename from" ${path}/${patch} && \ - grep -q "^rename to" ${path}/${patch} ; then + if ${uncomp} "${path}/$patch" | grep -q "^rename from" && \ + ${uncomp} "${path}/$patch" | grep -q "^rename to" ; then echo "Error: patch contains some renames, not supported by old patch versions" exit 1 fi echo "${path}/${patch}" >> ${builddir}/.applied_patches_list - ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t -N $silent + ${uncomp} "${path}/$patch" | patch -g0 -p1 -E --no-backup-if-mismatch -d "${builddir}" -t -N $silent if [ $? != 0 ] ; then echo "Patch failed! Please fix ${patch}!" exit 1 @@ -168,6 +168,3 @@ if [ "`find $builddir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print`" ] ; then echo "Aborting. Reject files found." exit 1 fi - -# Remove backup files -find $builddir/ '(' -name '*.orig' -o -name '.*.orig' ')' -exec rm -f {} \; |