From cc76b5710c7f8f844391c381a6ab8c47d900c716 Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Fri, 1 Oct 2010 22:58:49 +0200 Subject: [PATCH] If choosing the "md5" executable, check if it supports -r or (new) -n. FreeBSD uses -r, NetBSD -n for the same result. --- fetch_tarballs.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fetch_tarballs.sh b/fetch_tarballs.sh index 6a77841683d1..ca439ad09f61 100755 --- a/fetch_tarballs.sh +++ b/fetch_tarballs.sh @@ -94,7 +94,11 @@ for i in md5 md5sum /usr/local/bin/md5sum gmd5sum /usr/sfw/bin/md5sum /opt/sfw/b done if [ "$md5sum" = "md5" ]; then - md5special=-r + if md5 -r < /dev/null > /dev/null 2>/dev/null; then + md5special=-r + elif md5 -n < /dev/null > /dev/null 2>/dev/null; then + md5special=-n + fi fi if [ -z "$md5sum" ]; then