[include] Add git version check to prerequisite check (#11229)
[openwrt.git] / include / prereq-build.mk
index c80e004..2391e09 100644 (file)
@@ -121,8 +121,12 @@ $(eval $(call RequireCommand,wget, \
        Please install wget. \
 ))
 
-$(eval $(call RequireCommand,git, \
-       Please install git (git-core). \
+define Require/git
+       git --version | awk '($$$$1 == "git") && ($$$$2 == "version") && ($$$$3 >= "1.6.5") { print "ok" }' | grep ok > /dev/null
+endef
+
+$(eval $(call Require,git, \
+       Please install git (git-core) v1.6.5 or later. \
 ))
 
 define Require/gnutar
This page took 0.020703 seconds and 4 git commands to generate.