From d3fe22b28196195306e5b41c448acecbb6d79bdf Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 18:04:59 +0100 Subject: [PATCH] update __file to allow md5 also locally Signed-off-by: Nico Schottelius --- conf/type/__file/gencode | 14 ++++++++++++-- doc/dev/logs/2011-03-07 | 9 +++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 doc/dev/logs/2011-03-07 diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index 4d4a9a1e..0f3b1bf8 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -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 diff --git a/doc/dev/logs/2011-03-07 b/doc/dev/logs/2011-03-07 new file mode 100644 index 00000000..35dff279 --- /dev/null +++ b/doc/dev/logs/2011-03-07 @@ -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: - +