Skip to content
Snippets Groups Projects
Commit dd5d5877 authored by Simon Rose's avatar Simon Rose
Browse files

Fixed patch_site to not display error text if there is no patch file

parent 3be94fcc
No related branches found
No related tags found
Loading
# -*- mode: Makefile;-*- # -*- mode: Makefile;-*-
# Update the module version (for numeric versions) with a build number of 0 if none is specified
E3_MODULE_VERSION:=$(E3_MODULE_VERSION)$(shell [[ "$(E3_MODULE_VERSION)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$$ ]] && echo +0) E3_MODULE_VERSION:=$(E3_MODULE_VERSION)$(shell [[ "$(E3_MODULE_VERSION)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$$ ]] && echo +0)
include $(EPICS_BASE)/configure/CONFIG_BASE_VERSION include $(EPICS_BASE)/configure/CONFIG_BASE_VERSION
......
...@@ -16,19 +16,28 @@ git submodule update --remote --merge $@/ ...@@ -16,19 +16,28 @@ git submodule update --remote --merge $@/
endef endef
define patch_site define patch_site
for i in $(shell ls $(TOP)/patch/Site/$(E3_MODULE_VERSION)-+([a-zA-Z])*.p0.patch); do\ patches=$$(ls $(TOP)/patch/Site/$(E3_MODULE_VERSION)-*.p0.patch 2> /dev/null); \
printf "\nPatching %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \ if [ -n "$$patches" ]; then \
git apply --directory=$(E3_MODULE_SRC_PATH) --ignore-whitespace -p0 $$i;\ for i in $$patches; do \
done printf "\nPatching %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \
git apply --directory=$(E3_MODULE_SRC_PATH) --ignore-whitespace -p0 $$i; \
done; \
else \
echo ">>> No patches to apply" >&2; \
fi
endef endef
define patch_revert_site define patch_revert_site
for i in $(shell ls $(TOP)/patch/Site/$(E3_MODULE_VERSION)-+([a-zA-Z])*.p0.patch); do\ patches=$$(ls $(TOP)/patch/Site/$(E3_MODULE_VERSION)-*.p0.patch 2> /dev/null); \
printf "\nReverting applied patch %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \ if [ -n "$$patches" ]; then \
git apply -R --directory=$(E3_MODULE_SRC_PATH) --ignore-whitespace -p0 $$i;\ for i in $$patches; do\
done printf "\nReverting applied patch %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \
git apply -R --directory=$(E3_MODULE_SRC_PATH) --ignore-whitespace -p0 $$i;\
done \
else \
echo ">>> No patches to revert" >&2; \
fi
endef endef
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment