Browse Source

- helpers: fix APPLY_PATCHES

master
vanhofen 4 years ago
committed by GitHub
parent
commit
9db9a4fa6a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 28
      make/helpers.mk

28
make/helpers.mk

@ -16,21 +16,23 @@ endef
define apply_patches define apply_patches
l=$(strip $(2)); test -z $$l && l=1; \ l=$(strip $(2)); test -z $$l && l=1; \
for i in $(1); do \ for i in $(1); do \
if [ -d $$i ]; then \ if [ -e $$i ]; then \
for p in $$i/*; do \ if [ -d $$i ]; then \
echo -e "$(TERM_YELLOW)Applying $${p#$(PATCHES)/}$(TERM_NORMAL)"; \ for p in $$i/*; do \
if [ $${p:0:1} == "/" ]; then \ echo -e "$(TERM_YELLOW)Applying $${p#$(PATCHES)/}$(TERM_NORMAL)"; \
patch -p$$l -i $$p; \ if [ $${p:0:1} == "/" ]; then \
patch -p$$l -i $$p; \
else \
patch -p$$l -i $(PATCHES)/$$p; \
fi; \
done; \
else \
echo -e "$(TERM_YELLOW)Applying $${i#$(PATCHES)/}$(TERM_NORMAL)"; \
if [ $${i:0:1} == "/" ]; then \
patch -p$$l -i $$i; \
else \ else \
patch -p$$l -i $(PATCHES)/$$p; \ patch -p$$l -i $(PATCHES)/$$i; \
fi; \ fi; \
done; \
else \
echo -e "$(TERM_YELLOW)Applying $${i#$(PATCHES)/}$(TERM_NORMAL)"; \
if [ $${i:0:1} == "/" ]; then \
patch -p$$l -i $$i; \
else \
patch -p$$l -i $(PATCHES)/$$i; \
fi; \ fi; \
fi; \ fi; \
done done

Loading…
Cancel
Save