We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6292c99 commit 34809e2Copy full SHA for 34809e2
test/check_remote_java_tools_configs.sh
@@ -22,7 +22,11 @@ function download_and_check_hash() {
22
TMP_FILE=$(mktemp -q /tmp/remotejavatools.XXXXXX)
23
echo "fetching $name from $url to ${TMP_FILE}"
24
curl --silent -o ${TMP_FILE} -L "$url"
25
- actual_hash=`sha256sum ${TMP_FILE} | cut -d' ' -f1`
+ if command -v sha256sum &> /dev/null; then
26
+ actual_hash=`sha256sum ${TMP_FILE} | cut -d' ' -f1`
27
+ else
28
+ actual_hash=`shasum -a 256 ${TMP_FILE} | cut -d' ' -f1`
29
+ fi
30
if [ "${hash}" != "${actual_hash}" ]; then
31
echo "ERROR: wrong hash for ${name}! wanted: ${hash}, got: ${actual_hash}"
32
exit 1
0 commit comments