From 7a294bf41d165eaeac22f3698db4dc2697c95107 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 10:13:52 +0100 Subject: [PATCH] always setup __cdist_out_object_dir, which needs to be done anyway Signed-off-by: Nico Schottelius --- bin/cdist-code-run | 7 ++----- bin/cdist-code-run-all | 10 +++++----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/bin/cdist-code-run b/bin/cdist-code-run index 229d4d1d..a6a9137f 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run @@ -22,12 +22,9 @@ # . cdist-config -[ $# -eq 3 ] || __cdist_usage " " +[ $# -eq 2 ] || __cdist_usage " " set -ue -# This variable MUST be exactly like this - see __cdist_object_dir -__cdist_out_object_dir="$1"; shift - object="$1"; shift __cdist_gencode_type="$1"; shift @@ -50,7 +47,7 @@ echo "Checking code-${__cdist_gencode_type} for $object ..." if [ -f "$require" ]; then while read requirement; do echo "Requiring dependency $requirement for $object ..." - cdist-code-run "$__cdist_out_object_dir" "$requirement" "$__cdist_gencode_type" + cdist-code-run "$requirement" "$__cdist_gencode_type" done < "$require" fi diff --git a/bin/cdist-code-run-all b/bin/cdist-code-run-all index f301864b..1486cc46 100755 --- a/bin/cdist-code-run-all +++ b/bin/cdist-code-run-all @@ -38,13 +38,13 @@ while [ $# -ge 1 ]; do object="$1"; shift # Code local - cdist-code-run "$__cdist_out_object_dir" "$object" \ - "${__cdist_name_gencode_local}" \ + export __cdist_out_object_dir="$__cdist_out_object_dir" + cdist-code-run "$object" "${__cdist_name_gencode_local}" \ || __cdist_exit_err "Local code failed for $object" # Code remote - cdist-run-remote "$__cdist_target_host" \ - "cdist-code-run" "${__cdist_remote_out_object_base_dir}" "$object" \ - "${__cdist_name_gencode_remote}" \ + cdist-run-remote "$__cdist_target_host" \ + "export __cdist_out_object_dir=\"$__cdist_remote_out_object_base_dir\";" \ + "cdist-code-run" "$object" "${__cdist_name_gencode_remote}" \ || __cdist_exit_err "Remote code failed for $object" done < "$__cdist_tmp_file"