Skip to content

Commit

Permalink
doc: add shasum to check has on OSX
Browse files Browse the repository at this point in the history
adds the dependency `shasum` to check the checksum of ex_doc.
this was necessary because OSX does not come with sha256sum nor sha1sum.
  • Loading branch information
kikofernandez committed Aug 9, 2024
1 parent 991d2d6 commit 29cfafa
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 29cfafa

Please sign in to comment.