mirror of https://github.com/linkerd/linkerd2.git
Fix `fetch-proxy` script on macos (#4112)
`sha256sum` is not installed by default. Use `openssl dgst -sha256` instead.
This commit is contained in:
parent
42349d6280
commit
44f1078498
|
@ -28,7 +28,11 @@ curl -sLO "$assetbase/$shafile"
|
|||
|
||||
tar -zxvf "$pkgfile" >&2
|
||||
expected=$(awk '{print $1}' "$shafile")
|
||||
computed=$(sha256sum "$pkgfile" | awk '{print $1}')
|
||||
if [ $(uname) == "Darwin" ]; then
|
||||
computed=$(openssl dgst -sha256 "$pkgfile" | awk '{print $2}')
|
||||
else
|
||||
computed=$(sha256sum "$pkgfile" | awk '{print $1}')
|
||||
fi
|
||||
if [ "$computed" != "$expected" ]; then
|
||||
echo 'sha mismatch' >&2
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue