extend cdist-object-gencode* to include remote/local extension

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
remotes/origin/1.3
Nico Schottelius 14 years ago
parent 1af34c74b8
commit c5590cb648
  1. 4
      bin/cdist-config
  2. 2
      bin/cdist-object-gencode
  3. 7
      bin/cdist-object-gencode-all

@ -46,8 +46,8 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
: ${__cdist_name_conf_dir:=conf}
: ${__cdist_name_explorer:=explorer}
: ${__cdist_name_gencode:=gencode}
: ${__cdist_name_gencode_local:=$__cdist_name_gencode-local}
: ${__cdist_name_gencode_remote:=$__cdist_name_gencode-remote}
: ${__cdist_name_gencode_local:=local}
: ${__cdist_name_gencode_remote:=remote}
: ${__cdist_name_global:=global}
: ${__cdist_name_host:=host}
: ${__cdist_name_init:=init}

@ -35,7 +35,7 @@ __cdist_type="$(__cdist_type_from_object "$__cdist_object")"
__cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")"
# Full path to where the executable of the type should exist, if the type has one
gencode="$(__cdist_type_gencode "$__cdist_type")"
gencode="$(__cdist_type_gencode "$__cdist_type")-${__cdist_gencode_type}"
# export variables for gencode
export __object_id="$__cdist_object_id"

@ -31,9 +31,14 @@ __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file"
while read object; do
code="$(__cdist_object_code "$object")"
echo "Generating local code for $object ..."
cdist-object-gencode "$__cdist_target_host" "$object" \
"${__cdist_name_gencode_local}" > "${code}"
cdist-object-gencode "$__cdist_target_host" "$object" > "${code}"
echo "Generating remote code for $object ..."
cdist-object-gencode "$__cdist_target_host" "$object" \
"${__cdist_name_gencode_remote}" > "${code}"
chmod u+x "${code}"
done < "$__cdist_tmp_file"

Loading…
Cancel
Save