aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2021-09-02 13:09:42 -0700
committerGitHub <noreply@github.com>2021-09-02 13:09:42 -0700
commit4934cb4099937d01985ac51aa929e70bc962937a (patch)
tree0c1a16c055190911cae7f6d07e4345308247486f /scripts
parent8791fbac5db4412e94dfe01c0b388e196fe817dc (diff)
downloadvcpkg-4934cb4099937d01985ac51aa929e70bc962937a.tar.gz
vcpkg-4934cb4099937d01985ac51aa929e70bc962937a.zip
Apply @workpadwan 's fix to bootstrap.sh on non-bash systems. (#19911)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bootstrap.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh
index a7d1b1650..3e0776272 100644
--- a/scripts/bootstrap.sh
+++ b/scripts/bootstrap.sh
@@ -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>")"