cleanup in cdist-object-gencode

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-04-28 15:07:13 +02:00
parent bba8c641e5
commit 5e34bebc05

View file

@ -30,21 +30,19 @@ __cdist_target_host="$1"; shift
__cdist_object_self="$1"; shift __cdist_object_self="$1"; shift
__cdist_gencode_type="$1"; shift __cdist_gencode_type="$1"; shift
__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")"
__cdist_type="$(__cdist_type_from_object "$__cdist_object_self")" __cdist_type="$(__cdist_type_from_object "$__cdist_object_self")"
__cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object_self")"
__cdist_code_output="$(__cdist_object_code "$__cdist_object_self" "$__cdist_gencode_type")"
__cdist_type_gencode="$(__cdist_type_gencode "$__cdist_type" "$__cdist_gencode_type")" __cdist_type_gencode="$(__cdist_type_gencode "$__cdist_type" "$__cdist_gencode_type")"
__cdist_code_output="$(__cdist_object_code "$__cdist_object_self" "$__cdist_gencode_type")"
# export variables for gencode # export variables for the gencode script
export __object_id="$__cdist_object_id" export __object_id="$(__cdist_object_id_from_object "$__cdist_object_self")"
export __object="$__cdist_object_dir" export __object="$(__cdist_object_dir "$__cdist_object_self")"
export __global="$__cdist_out_dir" export __global="$__cdist_out_dir"
if [ -x "$__cdist_type_gencode" ]; then if [ -x "$__cdist_type_gencode" ]; then
__cdist_exec_fail_on_error "$gencode" > "$__cdist_tmp_file" __cdist_exec_fail_on_error "$__cdist_type_gencode" > "$__cdist_tmp_file"
else else
if [ -f "$__cdist_type_gencode" ]; then if [ -e "$__cdist_type_gencode" ]; then
__cdist_exit_err "$__cdist_type_gencode exists, but is not executable" __cdist_exit_err "$__cdist_type_gencode exists, but is not executable"
fi fi