diff --git a/HACKERS_README b/HACKERS_README index 8efed967..62f55b94 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -23,44 +23,16 @@ eof # Tell the user what we do, so this script makes sense during execution set -x -# Abort on any error -set -e - # prepare use (only from top level directory) export PATH="$PATH:$(pwd -P)/bin" export __cdist_config="$(pwd -P)/conf" -__cdist_out_objects=/tmp/localhost/objects -__cdist_out_explorers=/tmp/localhost/explorers -__cdist_out_execs=/tmp/localhost/exec +# Change paths so we can debug stuff :-) +base=/tmp/localhost +export __cdist_out_objects=${base}/objects +export __cdist_out_explorers=${base}/explorers +export __cdist_out_execs=${base}/exec +cdist-deploy-to localhost -# Run explorer on a "remote" host -cdist-explorer-run localhost "$__cdist_out_explorers" - -# Display result -find "$__cdist_out_explorers" - -# Test first level manifest execution -cdist-manifest-init localhost "$__cdist_out_objects" - -# See what it generated -find "$__cdist_out_objects" - -# Generate all objects, including from types that generate objects as well -cdist-manifest-run-all localhost "$__cdist_out_objects" - -# See what it generated -find "$__cdist_out_objects" - -# Generate code for all objects in object dir -cdist-object-codegen-all localhost "$__cdist_out_objects" "$__cdist_out_execs" - -# Display result, including permissions -ls -lR "$__cdist_out_execs" - -# Transfer generated code -cdist-exec-transfer localhost "$__cdist_out_execs" - -# Execute generated code -cdist-exec-run localhost +find "${base}" diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index d7917b87..6146d961 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -23,13 +23,18 @@ . cdist-config [ $# -eq 1 ] || __cdist_usage "" + set -e __cdist_target_host="$1" -export __cdist_out_explorers="$__cdist_tmp_dir/$__cdist_name_explorer" -export __cdist_out_objects="$__cdist_tmp_dir/$__cdist_name_object" -export __cdist_out_execs="$__cdist_tmp_dir/$__cdist_name_exec" +: ${__cdist_out_explorers:="$__cdist_tmp_dir/$__cdist_name_explorer"} +: ${__cdist_out_objects:="$__cdist_tmp_dir/$__cdist_name_object"} +: ${__cdist_out_execs:="$__cdist_tmp_dir/$__cdist_name_exec"} + +export __cdist_out_explorers +export __cdist_out_objects +export __cdist_out_execs # See cdist-stages(7) cdist-explorer-run "$__cdist_target_host" "$__cdist_out_explorers"