From 5b2c52b977db9c98672cf7274062be26e7e1eff1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 17:51:34 +0100 Subject: [PATCH] __file: support md5 of macosx Signed-off-by: Nico Schottelius --- conf/type/__file/explorer/md5sum | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/conf/type/__file/explorer/md5sum b/conf/type/__file/explorer/md5sum index a8ce6152..b2867385 100755 --- a/conf/type/__file/explorer/md5sum +++ b/conf/type/__file/explorer/md5sum @@ -27,9 +27,21 @@ else destination="/$__object_id" fi +os="$(cat $__global/explorer/os)" + +case "$os" in + macosx) + md5sum="md5" + ;; + + *) + md5sum="md5sum" + ;; +esac + # No output if file does not exist - does definitely not match the md5sum :-) if [ -e "$destination" ]; then - md5sum < "$destination" + $md5sum < "$destination" else echo "NO FILE FOUND, NO CHECKSUM CALCULATED." fi