Browse Source

Apply local patches

Michael Schwarz 5 years ago
parent
commit
77070de4a0
1 changed files with 15 additions and 0 deletions
  1. 15 0
      build.sh

+ 15 - 0
build.sh

@@ -153,6 +153,21 @@ SITE_COMMIT=$(git rev-list --max-count=1 HEAD)
 popd > /dev/null #${SITE_DIR}
 
 pushd ${CODE_DIR} > /dev/null
+
+### APPLY PATCHES TO GLUON
+progress "Applying Patches ..."
+git checkout -B patching "${BASE}"
+if [ -d "${PATCH_DIR}" -a "$(echo ${PATCH_DIR}/*.patch)" ]; then
+	git am --whitespace=nowarn ${PATCH_DIR}/*.patch || (
+		git am --abort
+		git checkout patched
+		git branch -D patching
+		false
+	)
+	[ "$?" -eq "0" ] || abort "Failed to apply patches, mimimi."
+fi
+git branch -M patched
+
 ### DIRCLEAN
 if [ -d "${GLUON_BUILD_DIR}/" -a "${CLEAN}" == "dirclean" ]; then
 	progress "Cleaning your build environment (make dirclean) ..."