add some debug to md5sum explorer

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-25 00:55:06 +01:00
parent 8d774ff152
commit 66610155ae

View file

@ -21,17 +21,21 @@
# Retrieve the md5sum of a file to be created, if it is already existing. # Retrieve the md5sum of a file to be created, if it is already existing.
# #
################################################################################
# New code
#
if [ -f parameters/destination ]; then exec 3>&1
destination="$(cat parameters/destination)" exec 1>&2
set -x
if [ -f "$__object/parameter/destination" ]; then
destination="$(cat "$__object/parameter/destination")"
else else
destination="$1" destination="$__object_id"
fi fi
# No output if file does not exist - does definitely not match the md5sum :-) # No output if file does not exist - does definitely not match the md5sum :-)
if [ -e "$destination" ]; then if [ -e "$destination" ]; then
md5sum "$destination" md5sum "$destination" >&3
else
echo "NO FILE NOT FOUND, NO CHECKSUM CALCULATED." >&3
fi fi