update __file to allow md5 also locally

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-03-07 18:04:59 +01:00
parent 5b2c52b977
commit d3fe22b281
2 changed files with 21 additions and 2 deletions

View file

@ -40,16 +40,26 @@ if ! $(echo "$destination" | grep -q ^/); then
exit 1
fi
case "$os" in
macosx)
md5sum="md5"
;;
*)
md5sum="md5sum"
;;
esac
# Copy source if existing
# FIXME: directory handling not supported - add recursive flag?
if [ -f "$__object/parameter/source" ]; then
source="$(cat "$__object/parameter/source")"
md5sum="$(md5sum < "$source")"
local_md5sum="$($md5sum < "$source")"
remote_md5sum="$(cat "$__object/explorer/md5sum")"
# Is md5sum the right approach?
if [ "$md5sum" != "$remote_md5sum" ]; then
if [ "$local_md5sum" != "$remote_md5sum" ]; then
# FIXME: This is ugly and hardcoded, replace after 1.0!
# Probably a better aproach is to have the user configured
# ~/.ssh/config to contain the right username

9
doc/dev/logs/2011-03-07 Normal file
View file

@ -0,0 +1,9 @@
Update on env:
general explorer: __explorer
initial manifest: __manifest, __global
type manifests __object, __object_id, __global
type explorers: __object, __object_id, __type_explorers, __global
type codegen: __object, __object_id, __global
type code: -