++__cdist_echo ++todo

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-04-06 21:15:11 +02:00
parent 4a7c6c2738
commit 35d4760c13
3 changed files with 13 additions and 13 deletions

View file

@ -27,9 +27,9 @@
set -eu
__cdist_target_host="$1"; shift
__cdist_object="$1"; shift
__cdist_object_self="$1"; shift
echo "Transferring object $__cdist_object to $__cdist_target_host ..."
__cdist_echo info "Transferring object $__cdist_target_host ..."
cdist-dir push "$__cdist_target_host" \
"$(__cdist_object_dir "$__cdist_object")" \
"$(__cdist_remote_object_dir "$__cdist_object")"
"$(__cdist_object_dir "$__cdist_object_self")" \
"$(__cdist_remote_object_dir "$__cdist_object_self")"

View file

@ -32,17 +32,17 @@
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 "Requested object is not defined: $__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_finished="$(__cdist_object_finished "$__cdist_object")"
__cdist_object_finished="$(__cdist_object_finished "$__cdist_object_self")"
if [ ! -f "$__cdist_object_finished" ]; then
# Resolve dependencies, if any
__cdist_object_require="$(__cdist_object_require "$__cdist_object")"
__cdist_object_require="$(__cdist_object_require "$__cdist_object_self")"
if [ -f "$__cdist_object_require" ]; then
echo
# NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP
@ -52,13 +52,11 @@ if [ ! -f "$__cdist_object_finished" ]; then
while [ $# -gt 0 ]; do
__cdist_requirement="$1"; shift
echo "Resolving dependency $__cdist_requirement for $__cdist_object ..."
echo "Resolving dependency $__cdist_requirement"
cdist-object-run "$__cdist_target_host" "$__cdist_requirement"
done
fi
echo
echo "Running object $__cdist_object"
cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object"
cdist-object-push "$__cdist_target_host" "$__cdist_object"
cdist-object-code-run "$__cdist_target_host" "$__cdist_object"

View file

@ -5,6 +5,8 @@ Feel free to pick one!
CORE
----
- Inconsistent error messages if object is not existing!
-> always use "Object undefined"
- Add echo function / beautify output
__cdist_echo [level] [messages...]
level := syslog alike: