xbps-src: add quiet mode
This commit is contained in:
parent
fc7015fd7e
commit
debdd551f4
2 changed files with 8 additions and 5 deletions
|
@ -75,10 +75,12 @@ msg_warn_nochroot() {
|
||||||
}
|
}
|
||||||
|
|
||||||
msg_normal() {
|
msg_normal() {
|
||||||
# normal messages in bold
|
if [ -z "$XBPS_QUIET" ]; then
|
||||||
[ -n "$NOCOLORS" ] || printf "\033[1m"
|
# normal messages in bold
|
||||||
printf "=> $@"
|
[ -n "$NOCOLORS" ] || printf "\033[1m"
|
||||||
[ -n "$NOCOLORS" ] || printf "\033[m"
|
printf "=> $@"
|
||||||
|
[ -n "$NOCOLORS" ] || printf "\033[m"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
msg_normal_append() {
|
msg_normal_append() {
|
||||||
|
|
3
xbps-src
3
xbps-src
|
@ -414,7 +414,7 @@ readonly XBPS_GCC_VERSION=${XBPS_GCC_VERSION_MAJOR}.${XBPS_GCC_VERSION_MINOR}.${
|
||||||
# main()
|
# main()
|
||||||
#
|
#
|
||||||
XBPS_OPTIONS=
|
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.
|
# Preprocess arguments in order to allow options before and after XBPS_TARGET.
|
||||||
eval set -- $(getopt "$XBPS_OPTSTRING" "$@");
|
eval set -- $(getopt "$XBPS_OPTSTRING" "$@");
|
||||||
|
@ -437,6 +437,7 @@ while getopts "$XBPS_OPTSTRING" opt; do
|
||||||
N) readonly XBPS_SKIP_REMOTEREPOS=1; XBPS_OPTIONS+=" -N";;
|
N) readonly XBPS_SKIP_REMOTEREPOS=1; XBPS_OPTIONS+=" -N";;
|
||||||
o) readonly XBPS_PKG_OPTIONS="$OPTARG"; XBPS_OPTIONS+=" -o $OPTARG";;
|
o) readonly XBPS_PKG_OPTIONS="$OPTARG"; XBPS_OPTIONS+=" -o $OPTARG";;
|
||||||
q) export XBPS_CHECK_PKGS=0; XBPS_OPTIONS+=" -q";;
|
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";;
|
r) readonly XBPS_ALT_REPOSITORY="$OPTARG"; XBPS_OPTIONS+=" -r $OPTARG";;
|
||||||
t) export XBPS_TEMP_MASTERDIR=1; XBPS_OPTIONS+=" -t -C";;
|
t) export XBPS_TEMP_MASTERDIR=1; XBPS_OPTIONS+=" -t -C";;
|
||||||
V) echo $XBPS_SRC_VERSION && exit 0;;
|
V) echo $XBPS_SRC_VERSION && exit 0;;
|
||||||
|
|
Loading…
Add table
Reference in a new issue