Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWilliam Giokas <1007380@gmail.com>2013-03-04 02:33:42 -0600
committerAllan McRae <allan@archlinux.org>2013-03-08 17:04:39 +1000
commit5a67eee78c58475907a2128c46c08c137d41e4f9 (patch)
tree0658317d46c324b9a36404ed4956ef7ea42b83ba /scripts
parent79d60f0f42a1df4f65ef1b1a930a6107000570fe (diff)
scripts: Add color to repo-add
Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/repo-add.sh.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 3e18a1a1..d4d72e4f 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -37,6 +37,7 @@ VERIFY=0
REPO_DB_FILE=
LOCKFILE=
CLEAN_LOCK=0
+USE_COLOR='y'
# ensure we have a sane umask set
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")"
return
fi
+ printf -- "$(gettext " --nocolor turn off color in output\n")"
printf -- "$(gettext " -q, --quiet minimize output\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")"
@@ -610,6 +612,7 @@ while (( $# )); do
-d|--delta) DELTA=1;;
-n|--new) ONLYADDNEW=1;;
-f|--files) WITHFILES=1;;
+ --nocolor) USE_COLOR='n';;
-s|--sign)
check_gpg
SIGN=1
@@ -642,6 +645,8 @@ while (( $# )); do
shift
done
+m4_include(library/term_colors.sh)
+
REPO_DB_FILE=${args[0]}
if [[ -z $REPO_DB_FILE ]]; then
usage