myos/make/apps/def.install.mk

10 lines
458 B
Makefile
Raw Normal View History

2021-06-09 00:44:36 +02:00
# function install-config: copy CONFIG files to application config folder
define install-config
2021-06-12 03:13:01 +02:00
$(call INFO,install-config,$(1)$(comma) $(2)$(comma) $(3)$(comma) $(4))
$(eval path:=$(or $(1),$(APP)))
$(eval file:=$(or $(2),$(DOCKER_SERVICE)))
$(eval dest:=$(or $(3),config))
$(eval env:=$(or $(4),$(ENV)))
$(if $(wildcard $(dest)/$(file)),,$(if $(wildcard $(CONFIG)/$(env)/$(path)/$(file)),$(RUN) cp -a $(CONFIG)/$(env)/$(path)/$(file) $(dest)))
2021-02-09 17:05:00 +01:00
endef