unpack: add --unsafe-paths to allow patching outside of git working area

This commit is contained in:
MilhouseVH 2017-02-17 06:40:16 +00:00
parent 9d149e88e8
commit 47d03c8586

View File

@ -173,7 +173,7 @@ for i in $PKG_DIR/patches/$PKG_NAME-*.patch \
if [ -f "$i" ]; then
printf "%${BUILD_INDENT}c ${boldgreen}APPLY PATCH${endcolor} ${boldwhite}${PATCH_DESC}${endcolor} ${i#$ROOT/}\n" ' '>&$SILENT_OUT
if [ -n "$(grep -E '^GIT binary patch$' $i)" ]; then
cat $i | git apply --directory=`echo "$PKG_BUILD" | cut -f1 -d\ ` -p1 --verbose --whitespace=nowarn >&$VERBOSE_OUT
cat $i | git apply --directory=`echo "$PKG_BUILD" | cut -f1 -d\ ` -p1 --verbose --whitespace=nowarn --unsafe-paths >&$VERBOSE_OUT
else
cat $i | patch -d `echo "$PKG_BUILD" | cut -f1 -d\ ` -p1 >&$VERBOSE_OUT
fi