xbps-src: add quiet mode

This commit is contained in:
Toyam Cox 2017-08-07 00:39:41 -04:00
parent fc7015fd7e
commit debdd551f4
2 changed files with 8 additions and 5 deletions

View File

@ -75,10 +75,12 @@ msg_warn_nochroot() {
}
msg_normal() {
# normal messages in bold
[ -n "$NOCOLORS" ] || printf "\033[1m"
printf "=> $@"
[ -n "$NOCOLORS" ] || printf "\033[m"
if [ -z "$XBPS_QUIET" ]; then
# normal messages in bold
[ -n "$NOCOLORS" ] || printf "\033[1m"
printf "=> $@"
[ -n "$NOCOLORS" ] || printf "\033[m"
fi
}
msg_normal_append() {

View File

@ -414,7 +414,7 @@ readonly XBPS_GCC_VERSION=${XBPS_GCC_VERSION_MAJOR}.${XBPS_GCC_VERSION_MINOR}.${
# main()
#
XBPS_OPTIONS=
XBPS_OPTSTRING="a:CEfgGhH:iIj:Lm:No:qr:tV"
XBPS_OPTSTRING="a:CEfgGhH:iIj:Lm:No:qQr:tV"
# Preprocess arguments in order to allow options before and after XBPS_TARGET.
eval set -- $(getopt "$XBPS_OPTSTRING" "$@");
@ -437,6 +437,7 @@ while getopts "$XBPS_OPTSTRING" opt; do
N) readonly XBPS_SKIP_REMOTEREPOS=1; XBPS_OPTIONS+=" -N";;
o) readonly XBPS_PKG_OPTIONS="$OPTARG"; XBPS_OPTIONS+=" -o $OPTARG";;
q) export XBPS_CHECK_PKGS=0; XBPS_OPTIONS+=" -q";;
Q) export XBPS_QUIET=1; XBPS_OPTIONS+=" -Q";;
r) readonly XBPS_ALT_REPOSITORY="$OPTARG"; XBPS_OPTIONS+=" -r $OPTARG";;
t) export XBPS_TEMP_MASTERDIR=1; XBPS_OPTIONS+=" -t -C";;
V) echo $XBPS_SRC_VERSION && exit 0;;