Difference between revisions of "Makefile"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) |
Rafahsolis (talk | contribs) |
||
| Line 7: | Line 7: | ||
<nowiki>TENKAICHI_USER := $(shell getent passwd tenkaichi) | <nowiki>TENKAICHI_USER := $(shell getent passwd tenkaichi) | ||
#LOGS_DIR := $(shell [ -e /tenkaichi/logs/ ] && echo 1 || echo 0 )) | #LOGS_DIR := $(shell [ -e /tenkaichi/logs/ ] && echo 1 || echo 0 )) | ||
| + | |||
| + | define create_user | ||
| + | $(info Creating tenkaichi user & group) | ||
| + | $(shell useradd --home-dir /tenkaichi --user-group --password $1$XZ3glFTm$310GteJW3A8/JBLT9pbQl/ tenkaichi); | ||
| + | $(shell mkhomedir_helper tenkaichi); | ||
| + | endef | ||
| + | |||
install: | install: | ||
ifeq ($(TENKAICHI_USER),) | ifeq ($(TENKAICHI_USER),) | ||
| − | $( | + | $(call create_user) |
| − | |||
| − | |||
endif | endif | ||
</nowiki> | </nowiki> | ||
Revision as of 18:14, 4 April 2018
https://devhints.io/makefile
https://gist.github.com/isaacs/62a2d1825d04437c6f08
http://www.gnu.org/software/make/manual/make.html
http://www.schacherer.de/frank/technology/tools/make.html#example
TENKAICHI_USER := $(shell getent passwd tenkaichi)
#LOGS_DIR := $(shell [ -e /tenkaichi/logs/ ] && echo 1 || echo 0 ))
define create_user
$(info Creating tenkaichi user & group)
$(shell useradd --home-dir /tenkaichi --user-group --password $1$XZ3glFTm$310GteJW3A8/JBLT9pbQl/ tenkaichi);
$(shell mkhomedir_helper tenkaichi);
endef
install:
ifeq ($(TENKAICHI_USER),)
$(call create_user)
endif