diff options
| author | Alexander Karatarakis <alex@karatarakis.com> | 2018-04-25 21:26:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-25 21:26:24 -0700 |
| commit | aa423c999bcac07577f656549c9645d538c517c2 (patch) | |
| tree | 21a72b94b4f63cb3636704087d1bfecf1c1fc1b3 /scripts | |
| parent | c78a609dabb0df43d0443452261f7c3b592b9b41 (diff) | |
| parent | 6a3c1db30bbdc0d2580a3c787d90811e6bb7823a (diff) | |
| download | vcpkg-aa423c999bcac07577f656549c9645d538c517c2.tar.gz vcpkg-aa423c999bcac07577f656549c9645d538c517c2.zip | |
Merge pull request #3329 from rudilee/master
Checking for sha512sum on OS which doesn't have shasum
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/bootstrap.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index c69dc0135..2225f029d 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -29,8 +29,15 @@ vcpkgCheckRepoTool() vcpkgCheckEqualFileHash() { url=$1; filePath=$2; expectedHash=$3 + + SHASUM="shasum -a 512" # sha512sum is not available on osx - actualHash=$(shasum -a 512 "$filePath") # sha512sum not available on osx + # checking for sha512sum on os which doesn't have shasum + if which sha512sum >/dev/null 2>&1; then + SHASUM=sha512sum + fi + + actualHash=$("$SHASUM" "$filePath") actualHash="${actualHash%% *}" # shasum returns [hash filename], so get the first word if ! [ "$expectedHash" = "$actualHash" ]; then |
