++__cdist_echo

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-04-06 21:12:00 +02:00
parent afdecb8836
commit 4a7c6c2738

View file

@ -29,19 +29,18 @@
set -eu
__cdist_target_host="$1"; shift
__cdist_object="$1"; shift
__cdist_object_dir="$(__cdist_object_dir "$__cdist_object")"
[ -d "$__cdist_object_dir" ] || __cdist_exit_err "Object undefined: $__cdist_object"
__cdist_object_self="$1"; shift
__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")"
[ -d "$__cdist_object_dir" ] || __cdist_exit_err "Object undefined"
# Export to non-core for use in manifest and gencode scripts
export $__cdist_name_var_self=$__cdist_object
export $__cdist_name_var_self=$__cdist_object_self
__cdist_object_prepared="$(__cdist_object_prepared "$__cdist_object")"
__cdist_object_prepared="$(__cdist_object_prepared "$__cdist_object_self")"
if [ ! -f "$__cdist_object_prepared" ]; then
echo
echo "Preparing object $__cdist_object"
cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object"
cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object"
__cdist_echo info "Preparing object"
cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object_self"
cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object_self"
# Mark this object as prepared
touch "$__cdist_object_prepared"