From 10017668f264b4761afff33c7301ace3b5e3d3b6 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Wed, 14 Jan 2015 23:06:10 +0000 Subject: [PATCH] Enable binary patching --- scripts/unpack | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/unpack b/scripts/unpack index 246dd148a4..66fe69e775 100755 --- a/scripts/unpack +++ b/scripts/unpack @@ -143,7 +143,11 @@ 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\n" ' '>&$SILENT_OUT - cat $i | patch -d `echo "$PKG_BUILD" | cut -f1 -d\ ` -p1 >&$VERBOSE_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 + else + cat $i | patch -d `echo "$PKG_BUILD" | cut -f1 -d\ ` -p1 >&$VERBOSE_OUT + fi fi done