mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
scripts: Add color to repo-add
Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
79d60f0f42
commit
5a67eee78c
@ -57,6 +57,9 @@ Common Options
|
|||||||
If the signature is invalid, an error is produced and the update does not
|
If the signature is invalid, an error is produced and the update does not
|
||||||
proceed.
|
proceed.
|
||||||
|
|
||||||
|
*\--nocolor*::
|
||||||
|
Remove color from repo-add and repo-remove output.
|
||||||
|
|
||||||
repo-add Options
|
repo-add Options
|
||||||
----------------
|
----------------
|
||||||
*-d, \--delta*::
|
*-d, \--delta*::
|
||||||
|
@ -37,6 +37,7 @@ VERIFY=0
|
|||||||
REPO_DB_FILE=
|
REPO_DB_FILE=
|
||||||
LOCKFILE=
|
LOCKFILE=
|
||||||
CLEAN_LOCK=0
|
CLEAN_LOCK=0
|
||||||
|
USE_COLOR='y'
|
||||||
|
|
||||||
# ensure we have a sane umask set
|
# ensure we have a sane umask set
|
||||||
umask 0022
|
umask 0022
|
||||||
@ -71,6 +72,7 @@ packages to remove can be specified on the command line.\n")"
|
|||||||
printf -- "$(gettext "Please move along, there is nothing to see here.\n")"
|
printf -- "$(gettext "Please move along, there is nothing to see here.\n")"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
printf -- "$(gettext " --nocolor turn off color in output\n")"
|
||||||
printf -- "$(gettext " -q, --quiet minimize output\n")"
|
printf -- "$(gettext " -q, --quiet minimize output\n")"
|
||||||
printf -- "$(gettext " -s, --sign sign database with GnuPG after update\n")"
|
printf -- "$(gettext " -s, --sign sign database with GnuPG after update\n")"
|
||||||
printf -- "$(gettext " -k, --key <key> use the specified key to sign the database\n")"
|
printf -- "$(gettext " -k, --key <key> use the specified key to sign the database\n")"
|
||||||
@ -610,6 +612,7 @@ while (( $# )); do
|
|||||||
-d|--delta) DELTA=1;;
|
-d|--delta) DELTA=1;;
|
||||||
-n|--new) ONLYADDNEW=1;;
|
-n|--new) ONLYADDNEW=1;;
|
||||||
-f|--files) WITHFILES=1;;
|
-f|--files) WITHFILES=1;;
|
||||||
|
--nocolor) USE_COLOR='n';;
|
||||||
-s|--sign)
|
-s|--sign)
|
||||||
check_gpg
|
check_gpg
|
||||||
SIGN=1
|
SIGN=1
|
||||||
@ -642,6 +645,8 @@ while (( $# )); do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
m4_include(library/term_colors.sh)
|
||||||
|
|
||||||
REPO_DB_FILE=${args[0]}
|
REPO_DB_FILE=${args[0]}
|
||||||
if [[ -z $REPO_DB_FILE ]]; then
|
if [[ -z $REPO_DB_FILE ]]; then
|
||||||
usage
|
usage
|
||||||
|
Loading…
Reference in New Issue
Block a user