From b55e4ceb6170b14a5a6ab6f3ce755891a9597339 Mon Sep 17 00:00:00 2001 From: "git@daemon.de" Date: Thu, 15 Oct 2015 13:31:51 +0200 Subject: [PATCH] use openssl if no native md5 tool exists --- tests/md5 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/md5 b/tests/md5 index 788a152..4a330e2 100755 --- a/tests/md5 +++ b/tests/md5 @@ -2,6 +2,11 @@ file=$1 if type md5 > /dev/null 2>&1; then md5 -q $* -else +elif type md5sum > /dev/null 2>&1; then md5sum $* | awk '{print $1}' +elif type openssl > /dev/null 2>&1; then + openssl md5 -r $* | awk '{print $1}' +else + echo "no MD5 tool found!" + exit 1 fi