From cde6496172268083dfed58c26f4f0770567ffa25 Mon Sep 17 00:00:00 2001 From: Matthew Hall Date: Sat, 31 Dec 2016 19:57:33 -0800 Subject: [PATCH] checkdeps.sh: support unusual git version strings (for OS X et. al.) (#3512) --- buildscripts/checkdeps.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildscripts/checkdeps.sh b/buildscripts/checkdeps.sh index 7bcbd1120..057f17b9d 100644 --- a/buildscripts/checkdeps.sh +++ b/buildscripts/checkdeps.sh @@ -144,7 +144,8 @@ assert_check_golang_env() { } assert_check_deps() { - installed_git_version=$(git version | awk '{print $NF}') + # support unusual Git versions such as: 2.7.4 (Apple Git-66) + installed_git_version=$(git version | perl -ne '$_ =~ m/git version (.*?)( |$)/; print "$1\n";') if ! check_minimum_version "${GIT_VERSION}" "${installed_git_version}"; then echo "ERROR" echo "Git version '${installed_git_version}' not supported."