From 99bf12a48f68ae66877befb06dab51bd45b54510 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 28 Apr 2011 14:45:14 +0200 Subject: [PATCH] move gencode type path combination into cdist-config Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- bin/cdist-object-gencode | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 366b7993..867ab135 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -241,7 +241,7 @@ __cdist_host_cache_dir() __cdist_object_code() { - echo "$(__cdist_object_dir "$1")/${__cdist_name_code}" + echo "$(__cdist_object_dir "$1")/${__cdist_name_code}-$2" } __cdist_object_prepared() diff --git a/bin/cdist-object-gencode b/bin/cdist-object-gencode index 83e9315f..642e29b1 100755 --- a/bin/cdist-object-gencode +++ b/bin/cdist-object-gencode @@ -23,7 +23,7 @@ # . cdist-config -[ $# -eq 4 ] || __cdist_usage "" "" "" "" +[ $# -eq 3 ] || __cdist_usage "" "" "" set -eu __cdist_target_host="$1"; shift @@ -33,6 +33,7 @@ __cdist_gencode_type="$1"; shift __cdist_object_dir="$(__cdist_object_dir "$__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}")" # Full path to where the executable of the type should exist, if the type has one gencode="$(__cdist_type_gencode "$__cdist_type")-${__cdist_gencode_type}"