From 66610155ae18f429570a279ac3e1945241146948 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 00:55:06 +0100 Subject: [PATCH] add some debug to md5sum explorer Signed-off-by: Nico Schottelius --- conf/type/__file/explorer/md5sum | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/conf/type/__file/explorer/md5sum b/conf/type/__file/explorer/md5sum index a4e7c335..ddfcc0f3 100755 --- a/conf/type/__file/explorer/md5sum +++ b/conf/type/__file/explorer/md5sum @@ -21,17 +21,21 @@ # Retrieve the md5sum of a file to be created, if it is already existing. # -################################################################################ -# New code -# -if [ -f parameters/destination ]; then - destination="$(cat parameters/destination)" +exec 3>&1 +exec 1>&2 + +set -x + +if [ -f "$__object/parameter/destination" ]; then + destination="$(cat "$__object/parameter/destination")" else - destination="$1" + destination="$__object_id" fi # No output if file does not exist - does definitely not match the md5sum :-) if [ -e "$destination" ]; then - md5sum "$destination" + md5sum "$destination" >&3 +else + echo "NO FILE NOT FOUND, NO CHECKSUM CALCULATED." >&3 fi