[BUILD] fix snapshot date extraction with negative timezones

Building with a last commit having a negative time offset would make
"date" complain.
This commit is contained in:
Willy Tarreau 2009-01-25 14:10:48 +01:00
parent 686ac828fa
commit 65ee6be6f6

View File

@ -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