diff --git a/xbps-src/shutils/common_funcs.sh b/xbps-src/shutils/common_funcs.sh index 98ce93a6807..e2ae43c5dea 100644 --- a/xbps-src/shutils/common_funcs.sh +++ b/xbps-src/shutils/common_funcs.sh @@ -72,6 +72,17 @@ msg_error() exit 1 } +msg_error_nochroot() +{ + [ -z "$1" ] && return 1 + + printf "\033[1m\033[31m" + echo "=> ERROR: $1" + printf "\033[m" + + exit 1 +} + msg_warn() { [ -z "$1" ] && return 1 @@ -86,6 +97,15 @@ msg_warn() printf "\033[m" } +msg_warn_nochroot() +{ + [ -z "$1" ] && return 1 + + printf "\033[1m\033[33m" + echo "=> WARNING: $1" + printf "\033[m" +} + msg_normal() { [ -z "$1" ] && return 1