introduce and use __cdist_exec_fail_on_error

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-22 11:39:23 +01:00
commit 5dcb719844
3 changed files with 5 additions and 29 deletions

View file

@ -41,17 +41,6 @@ if [ ! -x "${__cdist_manifest}" ]; then
__cdist_exit_err "${__cdist_manifest} needs to be executable."
fi
mkdir -p "${__cdist_output_dir}"
mkdir -p "${__cdist_output_dir}" || __cdist_exit_err "Cannot create output dir ${__cdist_output_dir}"
# Catch errors ourselves now
set +e
# Ensure manifest fails if any error exists - FIXME: redundant, cdist-object-codegen
(
set -e
. "${__cdist_manifest}"
); ret=$?
if [ "$ret" -ne 0 ]; then
__cdist_exit_err "Error: ${__cdist_manifest} exited non-zero."
fi
__cdist_exec_fail_on_error "${__cdist_manifest}"