Makefile: handle broken curl version number in version check

curl 7.11.0 through 7.12.2 when built from their official release archives will present a 5 digit version number instead of the documented 6 digits which breaks the version check in the Makefile. Correct these broken version numbers on the fly when extracting them to ensure the comparison works correctly. [jc: shortened the new sed scripts a bit] Signed-off-by: Tom G. Christensen <tgc@statsbiblioteket.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Tom G. Christensen committed Jan 30, 2015 at 10:52 UTC 3af67924e03ddb29a2b698266a9f27ef30cd663b
1 file changed +2 -2
Makefile
+2 -2
@@ -1035,13 +1035,13 @@ else
1035 REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
1036 PROGRAM_OBJS += http-fetch.o
1037 PROGRAMS += $(REMOTE_CURL_NAMES)
1038 - curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p)
1038 + curl_check := $(shell (echo 070908; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
1039 ifeq "$(curl_check)" "070908"
1040 ifndef NO_EXPAT
1041 PROGRAM_OBJS += http-push.o
1042 endif
1043 endif
1044 - curl_check := $(shell (echo 072200; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p)
1044 + curl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
1045 ifeq "$(curl_check)" "072200"
1046 USE_CURL_FOR_IMAP_SEND = YesPlease
1047 endif