Merge pull request #570 from darko-poljak/debug-to-cdist_loglevel

__debug -> __cdist_loglevel
This commit is contained in:
Darko Poljak 2017-09-07 10:09:57 +02:00 committed by GitHub
commit 7141e67d51

View file

@ -22,8 +22,16 @@ uri="$(cat "$__object/parameter/uri" 2>/dev/null \
|| echo "$__object_id")" || echo "$__object_id")"
target="$(cat "$__object/parameter/target")" target="$(cat "$__object/parameter/target")"
[ "$__debug" = "yes" ] && curl="curl" || curl="curl -s" case "$__cdist_loglevel" in
[ "$__debug" = "yes" ] && tar="tar -xvzp" || tar="tar -xzp" 10|5) # DEBUG or TRACE
curl="curl"
tar="tar -xvzp"
;;
*)
curl="curl -s"
tar="tar -xzp"
;;
esac
if [ -f "$__object/parameter/insecure" ] ; then if [ -f "$__object/parameter/insecure" ] ; then
curl="$curl -k" curl="$curl -k"