../bin/cdist-config -> __cdist_echo
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
75bff0b13f
commit
f3a88ef98d
3 changed files with 60 additions and 37 deletions
|
|
@ -162,41 +162,6 @@ for __cdist_lib in $__cdist_core_dir/*; do
|
|||
. "$__cdist_lib"
|
||||
done
|
||||
|
||||
__cdist_echo()
|
||||
{
|
||||
__cdist_echo_type="$1"; shift
|
||||
|
||||
set +u
|
||||
if [ "$__cdist_object_self" ]; then
|
||||
__cdist_echo_prefix="${__cdist_object_self}:"
|
||||
else
|
||||
__cdist_echo_prefix="core: "
|
||||
fi
|
||||
set -u
|
||||
|
||||
case "$__cdist_echo_type" in
|
||||
debug)
|
||||
set +u
|
||||
if [ "$__cdist_debug" ]; then
|
||||
echo $__cdist_echo_prefix "Debug: $@"
|
||||
fi
|
||||
set -u
|
||||
;;
|
||||
info)
|
||||
echo $__cdist_echo_prefix "$@"
|
||||
;;
|
||||
warn)
|
||||
echo $__cdist_echo_prefix "Warning: $@"
|
||||
;;
|
||||
error)
|
||||
echo $__cdist_echo_prefix "Error: $@" >&2
|
||||
;;
|
||||
*)
|
||||
echo "CORE BUG, who created the broken commit in $0?" >&2
|
||||
exit 23
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
__cdist_exec_fail_on_error()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue