debug for core/__cdist_object_code_run

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-09-08 00:10:53 +02:00
parent adf2e05a08
commit 279d519dda

View file

@ -26,7 +26,6 @@ __cdist_object_code_run()
{ {
[ $# -eq 1 ] || __cdist_exit_err "<object>" [ $# -eq 1 ] || __cdist_exit_err "<object>"
set -x
if [ ! -d "$(__cdist_object_dir "$1")" ]; then if [ ! -d "$(__cdist_object_dir "$1")" ]; then
__cdist_exit_err "Object undefined" __cdist_exit_err "Object undefined"
@ -34,6 +33,7 @@ __cdist_object_code_run()
# Code local # Code local
export __cdist_out_object_dir="$__cdist_out_object_dir" export __cdist_out_object_dir="$__cdist_out_object_dir"
__cdist_echo debug "Trying to run local code"
if __cdist_is_executable \ if __cdist_is_executable \
"$(__cdist_object_code "$1" "${__cdist_name_gencode_local}")"; then "$(__cdist_object_code "$1" "${__cdist_name_gencode_local}")"; then
__cdist_run_shell \ __cdist_run_shell \
@ -41,10 +41,10 @@ __cdist_object_code_run()
fi fi
# Code remote # Code remote
__cdist_echo debug "Trying to run remote code"
if __cdist_is_executable \ if __cdist_is_executable \
"$(__cdist_object_code "$1" "${__cdist_name_gencode_remote}")"; then "$(__cdist_object_code "$1" "${__cdist_name_gencode_remote}")"; then
__cdist_run_remote $(__cdist_remote_object_code "$1") __cdist_run_remote $(__cdist_remote_object_code "$1")
fi fi
set +x
} }