*.patch*)
type="patch"; uncomp="cat"; ;;
*)
- echo "Unsupported format file for ${patch}, skip it";
- return 0;
+ echo "Unsupported format file for ${path}/${patch}";
+ exit 1;
;;
esac
echo ""
echo "Applying $patch using ${type}: "
- echo $patch >> ${builddir}/.applied_patches_list
+ if [ ! -e "${path}/$patch" ] ; then
+ echo "Error: missing patch file ${path}/$patch"
+ exit 1
+ fi
+ echo $patch >> ${builddir}/.applied_patches_list
${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t
if [ $? != 0 ] ; then
echo "Patch failed! Please fix ${patch}!"
# to apply patches. Skip line starting with a dash.
if [ -e "${path}/series" ] ; then
for i in `grep -Ev "^#" ${path}/series 2> /dev/null` ; do
- apply_patch "$path" "$i" || exit 1
+ apply_patch "$path" "$i"
done
else
for i in `cd $path; ls -d $patches 2> /dev/null` ; do
tar -C "$unpackedarchivedir" -xaf "${path}/$i"
scan_patchdir "$unpackedarchivedir"
else
- apply_patch "$path" "$i" || exit 1
+ apply_patch "$path" "$i"
fi
done
fi