myos/make/apps/def.install.mk

9 lines
421 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-02-09 17:05:00 +01:00
$(eval path:=$(or $(1),$(APP)))
2021-06-02 00:54:33 +02:00
$(eval file:=$(or $(2),$(DOCKER_SERVICE)))
$(eval dest:=$(or $(3),config))
2021-02-09 17:05:00 +01:00
$(eval env:=$(or $(4),$(ENV)))
2021-06-09 00:44:36 +02:00
$(if $(wildcard $(dest)/$(file)),,$(if $(wildcard $(CONFIG)/$(env)/$(path)/$(file)),$(ECHO) cp -a $(CONFIG)/$(env)/$(path)/$(file) $(dest)))
2021-02-09 17:05:00 +01:00
endef