extend cdist-object-gencode* to include remote/local extension
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
1af34c74b8
commit
c5590cb648
3 changed files with 10 additions and 5 deletions
|
@ -46,8 +46,8 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
|
||||||
: ${__cdist_name_conf_dir:=conf}
|
: ${__cdist_name_conf_dir:=conf}
|
||||||
: ${__cdist_name_explorer:=explorer}
|
: ${__cdist_name_explorer:=explorer}
|
||||||
: ${__cdist_name_gencode:=gencode}
|
: ${__cdist_name_gencode:=gencode}
|
||||||
: ${__cdist_name_gencode_local:=$__cdist_name_gencode-local}
|
: ${__cdist_name_gencode_local:=local}
|
||||||
: ${__cdist_name_gencode_remote:=$__cdist_name_gencode-remote}
|
: ${__cdist_name_gencode_remote:=remote}
|
||||||
: ${__cdist_name_global:=global}
|
: ${__cdist_name_global:=global}
|
||||||
: ${__cdist_name_host:=host}
|
: ${__cdist_name_host:=host}
|
||||||
: ${__cdist_name_init:=init}
|
: ${__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")"
|
__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
|
# 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 variables for gencode
|
||||||
export __object_id="$__cdist_object_id"
|
export __object_id="$__cdist_object_id"
|
||||||
|
|
|
@ -31,9 +31,14 @@ __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file"
|
||||||
|
|
||||||
while read object; do
|
while read object; do
|
||||||
code="$(__cdist_object_code "$object")"
|
code="$(__cdist_object_code "$object")"
|
||||||
echo "Generating local code for $object ..."
|
|
||||||
|
|
||||||
cdist-object-gencode "$__cdist_target_host" "$object" > "${code}"
|
echo "Generating local code for $object ..."
|
||||||
|
cdist-object-gencode "$__cdist_target_host" "$object" \
|
||||||
|
"${__cdist_name_gencode_local}" > "${code}"
|
||||||
|
|
||||||
|
echo "Generating remote code for $object ..."
|
||||||
|
cdist-object-gencode "$__cdist_target_host" "$object" \
|
||||||
|
"${__cdist_name_gencode_remote}" > "${code}"
|
||||||
|
|
||||||
chmod u+x "${code}"
|
chmod u+x "${code}"
|
||||||
done < "$__cdist_tmp_file"
|
done < "$__cdist_tmp_file"
|
||||||
|
|
Loading…
Reference in a new issue