From 9f460a4c4fadf4500b48ab3aff91f5690ea6a892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 22 May 2020 20:25:59 +0300 Subject: [PATCH] simplify version.tex --- II/Referatas/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/II/Referatas/Makefile b/II/Referatas/Makefile index d5f2cb6..7cf9255 100644 --- a/II/Referatas/Makefile +++ b/II/Referatas/Makefile @@ -20,8 +20,9 @@ db/.faux_ready: zeimena.gpkg managedb touch $@ GIT_DIR = $(shell git rev-parse --show-toplevel)/.git - version.tex: $(shell git ls-files .) $(GIT_DIR) - date "+%F %T %Z" | awk '{print "\\gdef\\GeneratedAt{"$$0"}%"}' > $@ - [ -n "$$(git status --porcelain)" ] && suffix="-dirty"; \ - git describe --tags | awk '{print "\\gdef\\VCDescribe{"$$0"'$$suffix'}%"}' >> $@ + ( \ + date "+\\gdef\\GeneratedAt{%F %T %Z}%"; \ + [ -n "$$(git status --porcelain)" ] && suffix="-dirty"; \ + git describe --tags | awk '{print "\\gdef\\VCDescribe{"$$0"'$$suffix'}%"}'; \ + ) > $@