mirror of
https://github.com/yavook/kiwi-scp.git
synced 2024-11-22 04:43:00 +00:00
Formatting and guarding
This commit is contained in:
parent
90aeaf6611
commit
2ea8114378
1 changed files with 22 additions and 4 deletions
26
Makefile
26
Makefile
|
@ -1,4 +1,6 @@
|
||||||
# *.conf file handling
|
#########
|
||||||
|
# CONFIGS
|
||||||
|
|
||||||
CONF_WILDC:=$(wildcard $(PWD)/*.conf)
|
CONF_WILDC:=$(wildcard $(PWD)/*.conf)
|
||||||
CONF_SOURCE:=$(patsubst %,. %;,$(CONF_WILDC))
|
CONF_SOURCE:=$(patsubst %,. %;,$(CONF_WILDC))
|
||||||
|
|
||||||
|
@ -17,15 +19,31 @@ ifeq ($(CONF_TARGETROOT),)
|
||||||
$(error TARGETROOT not set in $(CONF_WILDC))
|
$(error TARGETROOT not set in $(CONF_WILDC))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# suffix for project directories
|
||||||
|
PROJ_SUFFX:=$(call confvalue,SUFFIX_PROJECT)
|
||||||
|
ifeq ($(PROJ_SUFFX),)
|
||||||
|
$(error SUFFIX_PROJECT not set in $(CONF_WILDC))
|
||||||
|
endif
|
||||||
|
|
||||||
|
# suffix for disabled project directories
|
||||||
|
DOWN_SUFFX:=$(call confvalue,SUFFIX_DOWN)
|
||||||
|
ifeq ($(SUFFIX_DOWN),)
|
||||||
|
$(error SUFFIX_DOWN not set in $(CONF_WILDC))
|
||||||
|
endif
|
||||||
|
|
||||||
|
#########
|
||||||
|
# CONSTANTS
|
||||||
|
|
||||||
# file to store docker network cidr
|
# file to store docker network cidr
|
||||||
FILE_DOCKERNET:=$(CONF_TARGETROOT)/up-$(CONF_DOCKERNET)
|
FILE_DOCKERNET:=$(CONF_TARGETROOT)/up-$(CONF_DOCKERNET)
|
||||||
|
|
||||||
# project directory handling
|
# project directory handling
|
||||||
PROJ_SUFFX:=$(call confvalue,SUFFIX_PROJECT)
|
|
||||||
DOWN_SUFFX:=$(call confvalue,SUFFIX_DOWN)
|
|
||||||
PROJ_WILDC:=$(wildcard *$(PROJ_SUFFX))
|
PROJ_WILDC:=$(wildcard *$(PROJ_SUFFX))
|
||||||
PROJ_NAMES:=$(basename $(PROJ_WILDC))
|
PROJ_NAMES:=$(basename $(PROJ_WILDC))
|
||||||
|
|
||||||
|
#########
|
||||||
|
# FUNCTIONS
|
||||||
|
|
||||||
# different complexities of commands with root privileges
|
# different complexities of commands with root privileges
|
||||||
# - in project directory
|
# - in project directory
|
||||||
projsudo=cd "$<"; sudo bash -c "$(1)"
|
projsudo=cd "$<"; sudo bash -c "$(1)"
|
||||||
|
@ -142,7 +160,7 @@ s?=bash
|
||||||
|
|
||||||
# default compose file
|
# default compose file
|
||||||
define COMPOSEFILE
|
define COMPOSEFILE
|
||||||
version: '2'
|
version: "3"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue