vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit c142666ed7c3e77c2f93ac17e4ace0fadc7f24ca
parent c4059aca95bdccbb95c815b52e528c130b1da415
Author: Christian Hesse <mail@eworm.de>
Date:   Sat,  1 Feb 2020 21:38:55 +0100

build: properly kill docker container

We keep a running docker container in the background. If the build
process fails this becomes dangling. Make sure the container is properly
killed.

Diffstat:
MMakefile | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -84,7 +84,10 @@ vis-single: vis-single.c vis-single-payload.inc ${CC} ${CFLAGS} ${CFLAGS_AUTO} ${CFLAGS_STD} ${CFLAGS_EXTRA} $< ${LDFLAGS} ${LDFLAGS_STD} ${LDFLAGS_AUTO} -luntar -llzma -o $@ ${STRIP} $@ -docker: clean +docker-kill: + -$(DOCKER) kill vis && $(DOCKER) wait vis + +docker: docker-kill clean $(DOCKER) build -t vis . $(DOCKER) run --rm -d --name vis vis tail -f /dev/null $(DOCKER) exec vis apk update @@ -98,7 +101,7 @@ docker: clean $(DOCKER) cp vis:/build/vis/vis-single vis $(DOCKER) kill vis -docker-clean: clean +docker-clean: docker-kill clean -$(DOCKER) image rm vis debug: clean @@ -187,4 +190,4 @@ uninstall: @echo removing support files from ${DESTDIR}${SHAREPREFIX}/vis @rm -rf ${DESTDIR}${SHAREPREFIX}/vis -.PHONY: all clean dist install uninstall debug profile coverage test test-update luadoc luadoc-all luacheck man docker docker-clean +.PHONY: all clean dist install uninstall debug profile coverage test test-update luadoc luadoc-all luacheck man docker-kill docker docker-clean