mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-21 23:38:49 -05:00
bacman: add option to print fewer status updates
Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
8f4a67bda9
commit
130c0d5496
@ -28,6 +28,7 @@ declare -r myname='bacman'
|
|||||||
declare -r myver='@PACKAGE_VERSION@'
|
declare -r myver='@PACKAGE_VERSION@'
|
||||||
USE_COLOR='y'
|
USE_COLOR='y'
|
||||||
INCLUDE_PACNEW='n'
|
INCLUDE_PACNEW='n'
|
||||||
|
QUIET=0
|
||||||
# Required for fakeroot because options are shifted off the array.
|
# Required for fakeroot because options are shifted off the array.
|
||||||
ARGS=("$@")
|
ARGS=("$@")
|
||||||
|
|
||||||
@ -54,6 +55,7 @@ usage() {
|
|||||||
echo
|
echo
|
||||||
printf -- "$(gettext "Options:")\n"
|
printf -- "$(gettext "Options:")\n"
|
||||||
printf -- "$(gettext " -h, --help Show this help message and exit")\n"
|
printf -- "$(gettext " -h, --help Show this help message and exit")\n"
|
||||||
|
printf -- "$(gettext " -q, --quiet Silence most of the status reporting")\n"
|
||||||
printf -- "$(gettext " -m, --nocolor Disable colorized output messages")\n"
|
printf -- "$(gettext " -m, --nocolor Disable colorized output messages")\n"
|
||||||
printf -- "$(gettext " --pacnew Package .pacnew files")\n"
|
printf -- "$(gettext " --pacnew Package .pacnew files")\n"
|
||||||
echo
|
echo
|
||||||
@ -78,8 +80,8 @@ for option in "$@"; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Parse arguments
|
# Parse arguments
|
||||||
OPT_SHORT='mv'
|
OPT_SHORT='qmv'
|
||||||
OPT_LONG=('nocolor' 'pacnew' 'version')
|
OPT_LONG=('quiet' 'nocolor' 'pacnew' 'version')
|
||||||
if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then
|
if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
@ -89,6 +91,8 @@ unset OPT_SHORT OPT_LONG OPTRET
|
|||||||
|
|
||||||
while :; do
|
while :; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
-q|--quiet)
|
||||||
|
QUIET=1 ;;
|
||||||
-m|--nocolor)
|
-m|--nocolor)
|
||||||
USE_COLOR='n' ;;
|
USE_COLOR='n' ;;
|
||||||
--pacnew)
|
--pacnew)
|
||||||
|
Loading…
Reference in New Issue
Block a user