[scripts] patch-kernel.sh: utilize --force (#7745), also use the PATCH env var and...
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 8 Oct 2010 09:21:01 +0000 (09:21 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 8 Oct 2010 09:21:01 +0000 (09:21 +0000)
SVN-Revision: 23314

scripts/patch-kernel.sh

index 5455a0cf8d53dfe87fb5b71a9354c96736e7db82..91753ba2fdf11406ceef41eea7c84a53984f532d 100755 (executable)
@@ -37,7 +37,7 @@ for i in ${patchdir}/${patchpattern} ; do
     [ -d "${i}" ] && echo "Ignoring subdirectory ${i}" && continue     
     echo ""
     echo "Applying ${i} using ${type}: " 
     [ -d "${i}" ] && echo "Ignoring subdirectory ${i}" && continue     
     echo ""
     echo "Applying ${i} using ${type}: " 
-    ${uncomp} ${i} | patch -p1 -E -d ${targetdir} 
+    ${uncomp} ${i} | ${PATCH:-patch} -f -p1 -E -d ${targetdir} 
     if [ $? != 0 ] ; then
         echo "Patch failed!  Please fix $i!"
        exit 1
     if [ $? != 0 ] ; then
         echo "Patch failed!  Please fix $i!"
        exit 1