From 7ea7632ae8bd19dc24870bcca6c77d760f7422fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 22 May 2020 22:18:15 +0300 Subject: [PATCH] dirty handling --- II/Referatas/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/II/Referatas/Makefile b/II/Referatas/Makefile index 14455d5..d572926 100644 --- a/II/Referatas/Makefile +++ b/II/Referatas/Makefile @@ -19,9 +19,10 @@ db/.faux_ready: zeimena.gpkg managedb ogr2ogr -f PostgreSQL "PG:host=127.0.0.1 user=osm dbname=osm" zeimena.gpkg touch $@ +DIRTY = $(shell git status --porcelain | awk 'NR==1{print "-dirty";exit}') GIT_DIR = $(shell git rev-parse --show-toplevel)/.git version.tex: $(shell git ls-files .) $(GIT_DIR) date '+\gdef\GeneratedAt{%F %T %Z}%' > $@ printf '\gdef\VCDescribe{%s%s}%%\n' \ $(shell git describe --tags) \ - $(shell git status --porcelain | awk 'NR==1{print "-dirty";exit}') >> $@ + $(DIRTY) >> $@