about summary refs log tree commit diff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2018-02-18 17:55:30 +0100
committerLeah Neukirchen <leah@vuxu.org>2018-02-18 17:55:30 +0100
commit205a4a0545f08a15e4fed98c00f72ada523f8523 (patch)
treefed8f0f3c21ab86dab497b4a6074c6684fbe1ded /GNUmakefile
parentbbd8165f462b440a12e3bd067c862ea22bb37fa2 (diff)
downloadmblaze-205a4a0545f08a15e4fed98c00f72ada523f8523.tar.gz
mblaze-205a4a0545f08a15e4fed98c00f72ada523f8523.tar.xz
mblaze-205a4a0545f08a15e4fed98c00f72ada523f8523.zip
museragent: don't show build date when $SOURCE_TIME_EPOCH is set
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 23f3964..63209fd 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -38,9 +38,10 @@ mmime : slurp.o
 minc mlist : squeeze_slash.o
 
 museragent: FRC
-	@printf '#!/bin/sh\nprintf "User-Agent: mblaze/%s (%s)\\n"\n' \
+	@test -n "$$SOURCE_TIME_EPOCH" || BUILDDATE=$$(date '+ (%Y-%m-%d)'); \
+		printf '#!/bin/sh\nprintf "User-Agent: mblaze/%s%s\\n"\n' \
 		"$$({ git describe --always --dirty 2>/dev/null || cat VERSION; } | sed 's/^v//')" \
-		"$$(date +%Y-%m-%d)" >$@
+		"$$BUILDDATE" >$@
 	@chmod +x $@
 
 README: man/mblaze.7