Use git format of patches
To avoid dependency on patch utility and to have standardized look
of patch file this change uses git-format and git-apply to patch
charts.
Change-Id: I1c63334619bf6091b5ab50a4eebfadb3c28a2616
Issue-ID: OOM-1634
Signed-off-by: Milan Verespej <m.verespej@partner.samsung.com>
diff --git a/build/fetch_and_patch_charts.sh b/build/fetch_and_patch_charts.sh
index 5000dbf..cde4265 100755
--- a/build/fetch_and_patch_charts.sh
+++ b/build/fetch_and_patch_charts.sh
@@ -51,6 +51,7 @@
# git and patch tools are preconditions for this to work
CURR=1
TOTAL=5
+PATCH_FILE=$(realpath "${3}")
echo -e "${_G}[Step $((CURR++))/${TOTAL} cloning repo with charts to be patched]${C_}"
git clone "${1}" "${4}"
@@ -62,7 +63,7 @@
git checkout "${2}"
echo -e "${_G}[Step $((CURR++))/${TOTAL} patching charts]${C_}"
-patch -p0 < "${3}"
+git apply "${PATCH_FILE}"
echo -e "${_G}[Step $((CURR++))/${TOTAL} returning to original working directory]${C_}"
popd