Apply @workpadwan 's fix to bootstrap.sh on non-bash systems. (#19911)

This commit is contained in:
Billy O'Neal 2021-09-02 13:09:42 -07:00 committed by GitHub
parent 8791fbac5d
commit 4934cb4099
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,10 +165,11 @@ fetchTool()
xmlFileAsString=`cat "$vcpkgRootDir/scripts/vcpkgTools.xml"`
toolRegexStart="<tool name=\"$tool\" os=\"$os\">"
toolData="$(extractStringBetweenDelimiters "$xmlFileAsString" "$toolRegexStart" "</tool>")"
if [ "$toolData" = "" ] || [[ "$toolData" == "<?xml"* ]]; then
case "$toolData" in
"" | "<!xml"*)
echo "No entry for $toolRegexStart in $vcpkgRootDir/scripts/vcpkgTools.xml"
return 1
fi
esac
version="$(extractStringBetweenDelimiters "$toolData" "<version>" "</version>")"