From ce3b83bfc105cd056ff3bdd74cdad02117a61b7d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 19:44:04 +0100 Subject: [PATCH] update cdist-config with more helper functions Signed-off-by: Nico Schottelius --- bin/cdist-config | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bin/cdist-config b/bin/cdist-config index 9aafe1d9..9610e063 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -118,6 +118,21 @@ __cdist_type_mydir() echo "${__cdist_type_dir}/${__cdist_type_current}" } +__cdist_type_gencode() +{ + local type="$1" + + echo "${__cdist_type_dir}/${type}/$__cdist_name_gencode" +} + +__cdist_object_arg() +{ + local arg="$1"; shift + local object="$1"; shift + + cat "${__cdist_object_base_dir}/${object}/${arg}" +} + __cdist_tmp_removal() { rm -rf "${__cdist_tmp_dir}"