also migrate cdist-object-gencode

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-06-14 00:41:52 +02:00
commit 152cc930e1
5 changed files with 78 additions and 75 deletions

View file

@ -22,17 +22,15 @@
# For the given object create the code to be executed on the target.
#
. cdist-config
[ $# -eq 2 ] || __cdist_usage "<target host> <object>"
set -eu
__cdist_object_gencode_run()
{
__cdist_object_gencode_run_object="$1"; shift
__cdist_target_host="$1"; shift
__cdist_object_self="$1"; shift
__cdist_echo info "Generating local code "
__cdist_object_gencode "$__cdist_object_gencode_run_object" \
"${__cdist_name_gencode_local}"
__cdist_echo info "Generating local code "
cdist-object-gencode "$__cdist_target_host" "$__cdist_object_self" \
"${__cdist_name_gencode_local}"
__cdist_echo info "Generating remote code "
cdist-object-gencode "$__cdist_target_host" "$__cdist_object_self" \
__cdist_echo info "Generating remote code "
__cdist_object_gencode "$__cdist_object_gencode_run_object" \
"${__cdist_name_gencode_remote}"
}