scripts/functions: use patch -i instead of IO redirection

This makes the patch name show up on the command line
logged by CT_DoExecLog so it's easier to see
what is going on.  The -i for patch is specified
by Posix and supported by GNU patch and busybox patch.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
[yann.morin.1998@free.fr: remove now-useless debug message]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <20121030103620.GB8303@sig21.net>
Patchwork-Id: 195418
This commit is contained in:
Johannes Stezenbach 2012-10-30 00:36:20 +00:00
parent de0ef330c3
commit 34a6501a2e

View File

@ -1050,8 +1050,7 @@ CT_Patch() {
if [ -n "${d}" -a -d "${d}" ]; then
for p in "${d}"/*.patch; do
if [ -f "${p}" ]; then
CT_DoLog DEBUG "Applying patch '${p}'"
CT_DoExecLog ALL patch --no-backup-if-mismatch -g0 -F1 -p1 -f <"${p}"
CT_DoExecLog ALL patch --no-backup-if-mismatch -g0 -F1 -p1 -f -i "${p}"
fi
done
if [ "${CT_PATCH_SINGLE}" = "y" ]; then