diff --git a/bin/cdist-code-run b/bin/cdist-code-run
index db1a2378..54cb312f 100755
--- a/bin/cdist-code-run
+++ b/bin/cdist-code-run
@@ -36,7 +36,6 @@ code="$(__cdist_object_code "$__cdist_object")-${__cdist_gencode_type}"
echo "Checking code-${__cdist_gencode_type} for $__cdist_object ..."
-
if [ -e "$code" ]; then
if [ -f "$code" ]; then
if [ -x "$code" ]; then
diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to
index aeae3b6c..02fd34fa 100755
--- a/bin/cdist-deploy-to
+++ b/bin/cdist-deploy-to
@@ -18,7 +18,7 @@
# along with cdist. If not, see .
#
#
-# Apply configuration to a host
+# Deploy configuration to a host
#
. cdist-config
@@ -45,8 +45,8 @@ __cdist_init_deploy "$__cdist_target_host"
# Transfer cdist executables
echo "Transferring cdist binaries to $__cdist_target_host ..."
-cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}"
-
+cdist-dir push "$__cdist_target_host" \
+ "${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}"
cdist-explorer-run-global "$__cdist_target_host"
cdist-manifest-run-init "$__cdist_target_host"
cdist-object-all "$__cdist_target_host" cdist-object-process
diff --git a/bin/cdist-dir b/bin/cdist-dir
index 72f4730b..0d30e14a 100755
--- a/bin/cdist-dir
+++ b/bin/cdist-dir
@@ -25,14 +25,11 @@
. cdist-config
-if [ $# -ne 4 ]; then
- __cdist_usage " "
-fi
+[ $# -eq 4 ] || __cdist_usage " "
set -ue
__cdist_action="$1"; shift
__cdist_target_host="$1"; shift
-
__cdist_src_dir="$1"; shift
__cdist_dst_dir="$1"; shift
diff --git a/bin/cdist-object-all b/bin/cdist-object-all
index 28df0613..391c9cc7 100755
--- a/bin/cdist-object-all
+++ b/bin/cdist-object-all
@@ -31,6 +31,9 @@ __cdist_command="$1"; shift
__cdist_objects="$__cdist_tmp_dir/objects"
+# Ensure object dir exists, so marker can be created
+mkdir -p "${__cdist_out_object_dir}"
+
# Loop until we do not create new objects anymore
# which is equal to all objects have been run
touch "$__cdist_objects_created"
diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run
index ff0668e5..4d8e2321 100755
--- a/bin/cdist-object-explorer-run
+++ b/bin/cdist-object-explorer-run
@@ -32,7 +32,6 @@ __cdist_object="$1"; shift
__object_id="$(__cdist_object_id_from_object "$__cdist_object")"
__cdist_type="$(__cdist_type_from_object "$__cdist_object")"
-
# Check if type of object has >= 1 explorer
__cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")"
# Run the type explorers for the current object if any
@@ -47,8 +46,8 @@ if [ "$__cdist_has_explorer" ]; then
echo "Running explorers for $__cdist_object ..."
# Copy object parameters
- cdist-dir push "$__cdist_target_host" \
- "$(__cdist_object_parameter_dir "$__cdist_object")" \
+ cdist-dir push "$__cdist_target_host" \
+ "$(__cdist_object_parameter_dir "$__cdist_object")" \
"$(__cdist_remote_object_parameter_dir "$__cdist_object")"
# Execute explorers
@@ -62,7 +61,7 @@ if [ "$__cdist_has_explorer" ]; then
"$(__cdist_remote_object_type_explorer_dir "$__cdist_object")"
# Copy back results
- cdist-dir pull "$__cdist_target_host" \
+ cdist-dir pull "$__cdist_target_host" \
"$(__cdist_remote_object_type_explorer_dir "$__cdist_object")" \
"$(__cdist_object_type_explorer_dir "$__cdist_object")"
fi
diff --git a/bin/cdist-object-gencode-run b/bin/cdist-object-gencode-run
index bfc65730..4d21fec9 100755
--- a/bin/cdist-object-gencode-run
+++ b/bin/cdist-object-gencode-run
@@ -29,15 +29,15 @@ set -eu
__cdist_target_host="$1"; shift
__cdist_object="$1"; shift
-code_local="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_local}"
-code_remote="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_remote}"
+__cdist_code_local="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_local}"
+__cdist_code_remote="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_remote}"
echo "Generating local code for $__cdist_object ..."
cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \
- "${__cdist_name_gencode_local}" > "${code_local}"
+ "${__cdist_name_gencode_local}" > "${__cdist_code_local}"
echo "Generating remote code for $__cdist_object ..."
cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \
- "${__cdist_name_gencode_remote}" > "${code_remote}"
+ "${__cdist_name_gencode_remote}" > "${__cdist_code_remote}"
-chmod u+x "${code_local}" "${code_remote}"
+chmod u+x "${__cdist_code_local}" "${__cdist_code_remote}"
diff --git a/bin/cdist-object-manifest-run b/bin/cdist-object-manifest-run
index 25378eb2..ce44cbbc 100755
--- a/bin/cdist-object-manifest-run
+++ b/bin/cdist-object-manifest-run
@@ -29,10 +29,7 @@ set -eu
__cdist_target_host="$1"; shift
__cdist_object="$1"; shift
-# Full path to current object
__cdist_cur_object_dir="$(__cdist_object_dir "$__cdist_object")"
-
-# Only the id
__cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")"
echo "Checking manifest for $__cdist_object ..."
@@ -46,12 +43,12 @@ if [ -f "$__cdist_manifest" ]; then
export __cdist_manifest
echo "Executing manifest ${__cdist_manifest} ..."
- # Make variables available to non-core - FIXME: beatify
export $__cdist_name_var_object="$__cdist_cur_object_dir"
export $__cdist_name_var_object_id="$__cdist_object_id"
export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")"
cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest"
+
# Tell cdist-object-run-all that there may be new objects
touch "$__cdist_objects_created"
else
diff --git a/bin/cdist-object-process b/bin/cdist-object-process
index d10840e8..777d2c88 100755
--- a/bin/cdist-object-process
+++ b/bin/cdist-object-process
@@ -31,7 +31,7 @@ set -eu
__cdist_target_host="$1"; shift
__cdist_object="$1"; shift
__cdist_object_dir="$(__cdist_object_dir "$__cdist_object")"
-[ -d "$__cdist_object_dir" ] || __cdist_exit_err "Requested object is not defined: $__cdist_object"
+[ -d "$__cdist_object_dir" ] || __cdist_exit_err "Object undefined: $__cdist_object"
# Export to non-core for use in manifest and gencode scripts
export $__cdist_name_var_self=$__cdist_object
diff --git a/bin/cdist-object-run b/bin/cdist-object-run
index 6c159ecf..667bf386 100755
--- a/bin/cdist-object-run
+++ b/bin/cdist-object-run
@@ -41,8 +41,7 @@ export $__cdist_name_var_self=$__cdist_object
__cdist_object_finished="$(__cdist_object_finished "$__cdist_object")"
if [ ! -f "$__cdist_object_finished" ]; then
-
- # Resolve dependencies if any
+ # Resolve dependencies, if any
__cdist_object_require="$(__cdist_object_require "$__cdist_object")"
if [ -f "$__cdist_object_require" ]; then
echo
diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator
index d0464533..2dcb47b3 100755
--- a/bin/cdist-type-emulator
+++ b/bin/cdist-type-emulator
@@ -53,7 +53,6 @@ if [ "$(echo $__cdist_object_id | grep "^/")" ]; then
else
__cdist_object_self="${__cdist_type}/${__cdist_object_id}"
fi
-
################################################################################
# Internal quirks
#
diff --git a/bin/cdist-type-template b/bin/cdist-type-template
index cd34027c..dc853614 100755
--- a/bin/cdist-type-template
+++ b/bin/cdist-type-template
@@ -27,7 +27,6 @@ set -eu
__cdist_type="$1"; shift
-
# Base
mkdir -p "$(__cdist_type_dir "$__cdist_type")"
diff --git a/doc/changelog b/doc/changelog
index d3091fd7..5e0e2314 100644
--- a/doc/changelog
+++ b/doc/changelog
@@ -1,4 +1,4 @@
-1.5.0: 2011-03-29
+1.5.0:
* Add basic cache functionality
* New type __process
* Restructured execution: (Steven Armstrong)
diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME
index 7f319790..67afba55 100644
--- a/doc/dev/todo/TAKEME
+++ b/doc/dev/todo/TAKEME
@@ -5,10 +5,24 @@ Feel free to pick one!
CORE
----
-- Add echo function:
+- Add echo function / beautify output
__cdist_echo [level] [messages...]
level := syslog alike:
debug, notice, err
+ Include object_self prefixing, if given!
+- Think about moving cdist-type-build-emulation out of cdist-manifest-run to
+ cdist-deploy-to: more dependency of cdist-manifest-run, but a lot of
+ less cycles consumed
+
+- cdist-object-gencode: remove code if output empty?
+ - also take care of that in cdist-code-run!
+- cdist-object-process -> cdist-object-prepare
+- Remove cdist-object-push, covers only one line and is used only once:
+ [20:22] kr:bin% grep cdist-object-push *
+ cdist-object-run: cdist-object-push "$__cdist_target_host" "$__cdist_object"
+ [20:22] kr:bin%
+
+- probably remove or improve cdist-type-template
TYPES
------