Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-06-14 10:57:33 +02:00
parent 00bbadef78
commit 022db22924
4 changed files with 47 additions and 36 deletions

View file

@ -24,10 +24,14 @@
# and __type_explorers can be submitted :-) # and __type_explorers can be submitted :-)
# #
. cdist-config # FIXME: cleanup!
__cdist_remote_explorer_run()
{
[ $# -eq 3 ] || __cdist_usage "<variable name> <explorer dir> <out dir>" [ $# -eq 3 ] || __cdist_usage "<variable name> <explorer dir> <out dir>"
set -ue set -ue
"$__cdist_name_var_object=\"$(__cdist_remote_object_dir "$__cdist_object_self")\""
# Variable that defines the home of the explorers # Variable that defines the home of the explorers
__cdist_variable_name="$1"; shift __cdist_variable_name="$1"; shift
@ -66,3 +70,4 @@ for explorer in "$__cdist_explorer_dir/"*; do
fi fi
fi fi
done done
}

View file

@ -23,7 +23,6 @@
__cdist_code_run() __cdist_code_run()
{ {
[ $# -eq 2 ] || __cdist_usage "<object> <type>" [ $# -eq 2 ] || __cdist_usage "<object> <type>"
__cdist_object_self="$1"; shift __cdist_object_self="$1"; shift
@ -49,4 +48,7 @@ __cdist_code_run()
__cdist_exit_err "$__cdist_code exists, but is not a file." __cdist_exit_err "$__cdist_code exists, but is not a file."
fi fi
fi fi
# Exit gracefully if nothing is todo
true
} }

View file

@ -28,7 +28,6 @@
__cdist_object_gencode() __cdist_object_gencode()
{ {
__cdist_myname="foo"
[ $# -eq 2 ] || __cdist_usage "<object>" "<type>" [ $# -eq 2 ] || __cdist_usage "<object>" "<type>"
__cdist_object_self="$1"; shift __cdist_object_self="$1"; shift

View file

@ -38,6 +38,8 @@ __cdist_object_run()
# Export to non-core for use in manifest and gencode scripts # Export to non-core for use in manifest and gencode scripts
export $__cdist_name_var_self=$__cdist_object_self export $__cdist_name_var_self=$__cdist_object_self
# FIXME: BUG: should be named differently!
# FIXME: BUG: I can be called recursively! -> variables are probably already set / overwritten!
__cdist_object_finished="$(__cdist_object_finished "$__cdist_object_self")" __cdist_object_finished="$(__cdist_object_finished "$__cdist_object_self")"
if [ ! -f "$__cdist_object_finished" ]; then if [ ! -f "$__cdist_object_finished" ]; then
# Resolve dependencies, if any # Resolve dependencies, if any
@ -52,9 +54,12 @@ __cdist_object_run()
__cdist_requirement="$1"; shift __cdist_requirement="$1"; shift
__cdist_echo info "Resolving requirement $__cdist_requirement" __cdist_echo info "Resolving requirement $__cdist_requirement"
__cdist_object_run "$__cdist_requirement" __cdist_object_run "$__cdist_requirement"
echo "done run"
done done
fi fi
echo "after done"
__cdist_object_gencode_run "$__cdist_object_self" __cdist_object_gencode_run "$__cdist_object_self"
__cdist_dir push "$(__cdist_object_dir "$__cdist_object_self")" \ __cdist_dir push "$(__cdist_object_dir "$__cdist_object_self")" \
"$(__cdist_remote_object_dir "$__cdist_object_self")" "$(__cdist_remote_object_dir "$__cdist_object_self")"