FIX: -D and -q work again (see #78 )

This commit is contained in:
boyska 2012-01-17 13:05:38 +01:00 committed by Jaromil
parent 9e32766e07
commit 40ca8b0ee6

View File

@ -88,29 +88,29 @@ function _message say()
{ {
local notice="message" local notice="message"
[[ "$1" = "-n" ]] && shift && notice="inline" [[ "$1" = "-n" ]] && shift && notice="inline"
(( $QUIET )) || _msg "$notice" "$1" option_is_set -q || _msg "$notice" "$1"
return 0 return 0
} }
alias act="_message -n" alias act="_message -n"
function _verbose xxx() function _verbose xxx()
{ {
(( $DEBUG )) && _msg verbose "$1" option_is_set -D && _msg verbose "$1"
return 0 return 0
} }
function _success yes() function _success yes()
{ {
(( $QUIET )) || _msg success "$1" option_is_set -q || _msg success "$1"
return 0 return 0
} }
function _warning no() function _warning no()
{ {
(( $QUIET )) || _msg warning "$1" option_is_set -q || _msg warning "$1"
return 1 return 1
} }
function _failure die() function _failure die()
{ {
typeset -i exitcode=${2:-1} typeset -i exitcode=${2:-1}
(( $QUIET )) || _msg failure "$1" option_is_set -q || _msg failure "$1"
exit $exitcode exit $exitcode
} }