add id in error string

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-17 16:17:41 +01:00
parent 1b2ed7ab8a
commit f392543d43

View file

@ -39,6 +39,9 @@ echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || \
__cdist_object="${__cdist_type}/${__cdist_object_id}" __cdist_object="${__cdist_type}/${__cdist_object_id}"
__cdist_ddir="$__cdist_output_dir/${__cdist_object}" __cdist_ddir="$__cdist_output_dir/${__cdist_object}"
# Append id for error messages
__cdist_myname="$__cdist_myname ($__cdist_object_id)"
if [ -e "${__cdist_ddir}" ]; then if [ -e "${__cdist_ddir}" ]; then
source="$(__cdist_object_source "${__cdist_ddir}")" source="$(__cdist_object_source "${__cdist_ddir}")"
__cdist_exit_err "${__cdist_object} already exists (source: $source)" __cdist_exit_err "${__cdist_object} already exists (source: $source)"
@ -46,8 +49,6 @@ fi
mkdir -p "${__cdist_ddir}" mkdir -p "${__cdist_ddir}"
echo "I am $__cdist_myname and have been called with $@"
# Record (correct ;-) source # Record (correct ;-) source
echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_name_object_source}" echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_name_object_source}"