Skip to content

Commit

Permalink
Merge pull request #8707 from kikofernandez/kiko/doc/add-shasum-to-bu…
Browse files Browse the repository at this point in the history
…ild-doc-on-osx/GH-8656

otp_build: add shasum to check hash on OSX

OTP-19193
  • Loading branch information
kikofernandez authored Aug 16, 2024
2 parents 94697ee + 29cfafa commit 5452810
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion HOWTO/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ also find the utilities needed for building the documentation.
but any version after that should work just as well.

You can also use `./otp_build download_ex_doc` to download the correct version
from github.
from github. One of the following dependencies are needed to check the documentation:

- sha256sum, or
- sha1sum, or
- shasum

How to Build and Install Erlang/OTP
-----------------------------------
Expand Down
7 changes: 6 additions & 1 deletion otp_build
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,13 @@ do_download_ex_doc ()
echo "The sha1sum check of $ERL_TOP/bin/ex_doc failed!" >&2
exit 1
fi
elif command -v shasum > /dev/null; then
if ! (cd "$ERL_TOP/make" && shasum -a 1 --status -c "ex_doc.sha1sum"); then
echo "The shasum check of $ERL_TOP/bin/ex_doc failed!" >&2
exit 1
fi
else
echo "Neither sha1sum nor sha256sum found to verify $ERL_TOP/bin/ex_doc" >&2
echo "Neither sha1sum nor sha256sum nor shasum found to verify $ERL_TOP/bin/ex_doc" >&2
echo "Please check manually that the correct ex_doc was downloaded." >&2
exit 1
fi
Expand Down

0 comments on commit 5452810

Please sign in to comment.