summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Parise <jon@indelible.org>2021-08-04 16:42:59 -0700
committerGitHub <noreply@github.com>2021-08-05 08:42:59 +0900
commit9eb39348e928e6a89938784e67ba4168c5a295c0 (patch)
treedfdd789f0593bd09a5ad15f48f3e0911e80758e7
parent3ba40b431689f96eac51596f407053607bde24f8 (diff)
downloadale-9eb39348e928e6a89938784e67ba4168c5a295c0.zip
Use md5(1) when available (#3855)
md5sum isn't available by default on macOS. Instead, it ships the BSD-style md5(1) command, which does the same thing but with different arguments. With this change, run-tests works out-of-the-box on macOS.
-rwxr-xr-xrun-tests6
1 files changed, 5 insertions, 1 deletions
diff --git a/run-tests b/run-tests
index 6c2153fa..d0ca0ac6 100755
--- a/run-tests
+++ b/run-tests
@@ -9,7 +9,11 @@
image=denseanalysis/ale
# Create docker image tag based on Dockerfile contents
-image_tag=$(md5sum Dockerfile | cut -d' ' -f1)
+if [ -n "$(command -v md5)" ]; then
+ image_tag=$(md5 -q Dockerfile)
+else
+ image_tag=$(md5sum Dockerfile | cut -d' ' -f1)
+fi
git_version=$(git describe --always --tags)
# Used in all test scripts for running the selected Docker image.