Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support md5 command #581

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions build-native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,20 @@ else
fi

checksum() {
# Determine whether to use md5sum or md5
if command -v md5sum >/dev/null 2>&1; then
hash_cmd="md5sum"
elif command -v md5 >/dev/null 2>&1; then
hash_cmd="md5 -r" # Use md5 -r for macOS to match md5sum format
else
echo "Neither md5sum nor md5 is available."
exit 1
fi

find Cargo.toml Cargo.lock native-engine target/$profile/libblaze."$libsuffix" | \
xargs md5sum 2>&1 | \
xargs $hash_cmd 2>&1 | \
sort -k1 | \
md5sum
$hash_cmd
}

checksum_cache_file="./.build-checksum_$profile-"$libsuffix".cache"
Expand Down