From: Willy Tarreau Date: Sun, 25 Jan 2009 13:10:48 +0000 (+0100) Subject: [BUILD] fix snapshot date extraction with negative timezones X-Git-Tag: v1.3.16-rc1~60 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=65ee6be6f63fe4cd76fe9a22dfafc93ad2e24b82;p=thirdparty%2Fhaproxy.git [BUILD] fix snapshot date extraction with negative timezones Building with a last commit having a negative time offset would make "date" complain. --- diff --git a/Makefile b/Makefile index 89f1b61c6e..2619a653d6 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