Improve makefile and add dockerignore.

This commit is contained in:
redxef 2021-12-22 17:34:56 +01:00
parent eaaab4281e
commit 480d0a6472
2 changed files with 16 additions and 4 deletions

6
.dockerignore Normal file
View file

@ -0,0 +1,6 @@
.gitignore
build-docker
Makefile
README.md
start
start.tmpl

View file

@ -1,8 +1,9 @@
PREFIX := /usr/local
START_SCRIPT := start START_SCRIPT := start
START_SCRIPT_SRC := start.tmpl START_SCRIPT_SRC := start.tmpl
INSTALLATION_NAME := openvpn-aria2 INSTALLATION_NAME := docker-aria2
DOCKERFILE := Dockerfile DOCKERFILE := Dockerfile
TAG = openvpn-aria2 TAG = docker-aria2
build: build-docker $(START_SCRIPT) build: build-docker $(START_SCRIPT)
@ -15,10 +16,15 @@ $(START_SCRIPT): $(START_SCRIPT_SRC)
sed -e "s/{TAG}/$(TAG)/g" -e "s/{INSTALLATION_NAME}/$(INSTALLATION_NAME)/g" $< > $@ sed -e "s/{TAG}/$(TAG)/g" -e "s/{INSTALLATION_NAME}/$(INSTALLATION_NAME)/g" $< > $@
chmod +x $@ chmod +x $@
shellcheck: $(START_SCRIPT)
shellcheck $<
check: shellcheck
clean: clean:
$(RM) build-docker $(START_SCRIPT) $(RM) build-docker $(START_SCRIPT)
install: build install: build
install -D --mode=755 $(START_SCRIPT) /usr/local/bin/$(INSTALLATION_NAME) install -D --mode=755 $(START_SCRIPT) $(PREFIX)/bin/$(INSTALLATION_NAME)
.PHONY: clean .PHONY: shellcheck check clean