From 10ebdd87d4e21c599dc29db6b604ed6e8d0fff0b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 16 Apr 2011 23:31:15 +0200 Subject: [PATCH] fixes + local and remote gencode Signed-off-by: Nico Schottelius --- bin/cdist-type-template | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/bin/cdist-type-template b/bin/cdist-type-template index 335a0ed9..772b7486 100755 --- a/bin/cdist-type-template +++ b/bin/cdist-type-template @@ -26,11 +26,11 @@ set -eu __cdist_type="$1"; shift -__cdist_type_dir="$(__cdist_type_dir "$__cdist_type")" +__cdist_my_type_dir="$(__cdist_type_dir "$__cdist_type")" -echo "Creating type $__cdist_type in $__cdist_type_dir ..." +echo "Creating type $__cdist_type in $__cdist_my_type_dir ..." # Base -mkdir -p "$__cdist_type_dir" +mkdir -p "$__cdist_my_type_dir" # Parameter mkdir -p "$(__cdist_type_parameter_dir "$__cdist_type")" @@ -38,11 +38,11 @@ touch "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_parameter_re touch "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_parameter_optional}" # Manifest -cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_manifest}" +cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$__cdist_my_type_dir/${__cdist_name_manifest}" # # This is the manifest, which can be used to create other objects like this: -# __file /path/to/destination --source /from/where/ --type file +# __file /path/to/destination --source /from/where/ # # To tell cdist to make use of it, you need to make it executable (chmod +x) # @@ -50,8 +50,8 @@ cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cd eof -# Gencode -cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_gencode}" +# Gencode remote +cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_gencode}-${__cdist_name_gencode_remote}" # # This file should generate code on stdout, which will be collected by cdist @@ -63,5 +63,17 @@ cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cd eof +cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_gencode}-${__cdist_name_gencode_local}" + +# +# This file should generate code on stdout, which will be collected by cdist +# and run on the same machine cdist-deploy-to is executed. +# +# To tell cdist to make use of it, you need to make it executable (chmod +x) +# +# + +eof + # Explorer -mkdir -p "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_explorer}" +mkdir -p "$__cdist_my_type_dir/${__cdist_name_explorer}"