Skip to content

Commit

Permalink
exit if hashes do not have correct size
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKreil committed Sep 28, 2023
1 parent e26a677 commit 88f7e31
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bin/make_formula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ url_int="https://github.com/versatiles-org/versatiles-rs/releases/download/${ver
sha_arm=$(curl -Ls "$url_arm.sha256")
sha_int=$(curl -Ls "$url_int.sha256")

if [[ ${#sha_arm} != 64 ]] | [[ ${#sha_int} != 64 ]]; then
echo "SHA has wrong size:"
echo " SHA Arm: $sha_arm"
echo " SHA Int: $sha_int"
exit 1
fi

cat <<_EOT_ > versatiles.rb
class Versatiles < Formula
desc "A toolbox for converting, checking and serving map tiles in various formats."
Expand All @@ -29,4 +36,4 @@ class Versatiles < Formula
bin.install "versatiles"
end
end
_EOT_
_EOT_

0 comments on commit 88f7e31

Please sign in to comment.