Apparently, Mac OS X /bin/date treats -d entirely differently than GNU /bin/date. This should work no matter what /bin/date you have installed. --- ui/content/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/ui/content/Makefile b/ui/content/Makefile index b5a5181..75f7aef 100644 --- a/ui/content/Makefile +++ b/ui/content/Makefile @@ -5,7 +5,14 @@ all: libs +DATE_FMT = +%Y%m%d-%H%M SOURCE_DATE_EPOCH ?= $(shell date +%s) +# first try GNU /bin/date syntax; if that doesn't work, try BSD +# /bin/date syntax. If that still fails, ignore SOURCE_DATE_EPOCH +ENIG_BUILD_DATE=$(shell TZ=UTC date $(DATE_FMT) -d "@$(SOURCE_DATE_EPOCH)" 2>/dev/null || \ + TZ=UTC date -r "$(SOURCE_DATE_EPOCH)" $(DATE_FMT) || \ + TZ=UTC date $(DATE_FMT) ) + libs: - echo 'var EnigBuildDate="'`TZ=UTC date +%Y%m%d-%H%M -d @$(SOURCE_DATE_EPOCH)`'";' > enigmailBuildDate.js + echo 'var EnigBuildDate="$(ENIG_BUILD_DATE)";' > enigmailBuildDate.js -- 2.1.4 _______________________________________________ enigmail-users mailing list [email protected] To unsubscribe or make changes to your subscription click here: https://admin.hostpoint.ch/mailman/listinfo/enigmail-users_enigmail.net
