fix type __file: md5sum from stdin (=same name) and prepend / to object_id

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-03-03 15:42:09 +01:00
parent 3ff0b4a393
commit 1d133ecb0a
2 changed files with 4 additions and 4 deletions

View File

@ -24,12 +24,12 @@
if [ -f "$__object/parameter/destination" ]; then
destination="$(cat "$__object/parameter/destination")"
else
destination="$__object_id"
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"
else
echo "NO FILE NOT FOUND, NO CHECKSUM CALCULATED."
echo "NO FILE FOUND, NO CHECKSUM CALCULATED."
fi

View File

@ -49,7 +49,7 @@ if [ -f "$__object/parameter/source" ]; then
exec 1>&2
set -x
md5sum="$(md5sum "$source")"
md5sum="$(md5sum < "$source")"
remote_md5sum="$(cat "$__object/explorer/md5sum")"
# Is md5sum the right approach?