From 65ee6be6f63fe4cd76fe9a22dfafc93ad2e24b82 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 25 Jan 2009 14:10:48 +0100 Subject: [PATCH] [BUILD] fix snapshot date extraction with negative timezones Building with a last commit having a negative time offset would make "date" complain. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 89f1b61c6..2619a653d 100644 --- a/Makefile +++ b/Makefile @@ -259,7 +259,7 @@ VERSION := $(shell [ -d .git/. ] && ref=`(git-describe --tags) 2>/dev/null` && r ifneq ($(VERSION),) # OK git is there and works. SUBVERS := $(shell comms=`git-log --no-merges v$(VERSION).. 2>/dev/null |grep -c ^commit `; [ $$comms -gt 0 ] && echo "-$$comms" ) -VERDATE := $(shell date +%Y/%m/%d -d "`git-log HEAD^.. 2>/dev/null | grep -m 1 ^Date: | cut -f2- -d: | cut -f1 -d+`" ) +VERDATE := $(shell date +%Y/%m/%d -d "`git-log HEAD^.. 2>/dev/null | sed -ne '/^Date:/{s/\(^[^ ]*:\)\|\( [-+].*\)//gp;q}'`" ) endif endif