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