Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Frazier <eyeswide@gmail.com>2013-07-15 13:02:33 -0400
committerAllan McRae <allan@archlinux.org>2013-07-30 13:00:10 +1000
commitb1b9ca01f06b74924945ea1ac75d36d1ea89c423 (patch)
treec65e12fb61d50aac0c49cad6ef617542ec4ce606
parent05e954d2cd71bf1031a79bd77610c6cb1da9ef54 (diff)
pacdiff: add --nocolor option for the terminally challenged.
Allow colors to be disabled for use on broken/serial terminals. Signed-off-by: Jonathan Frazier <eyeswide@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--contrib/pacdiff.sh.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/pacdiff.sh.in b/contrib/pacdiff.sh.in
index ce7de529..a64be4ce 100644
--- a/contrib/pacdiff.sh.in
+++ b/contrib/pacdiff.sh.in
@@ -29,8 +29,6 @@ declare -a oldsaves
m4_include(../scripts/library/output_format.sh)
-m4_include(../scripts/library/term_colors.sh)
-
usage() {
cat <<EOF
$myname is a simple pacnew/pacorig/pacsave updater.
@@ -39,6 +37,7 @@ Usage: $myname [-l]
Options:
-l/--locate scan using locate (default: find)
+ --nocolor remove colors from output
Enviroment Variables:
DIFFPROG override the merge program: (default: vimdiff)
@@ -68,6 +67,8 @@ while [[ -n "$1" ]]; do
case "$1" in
-l|--locate)
locate=1;;
+ --nocolor)
+ USE_COLOR='n' ;;
-V|--version)
version; exit 0;;
-h|--help)
@@ -78,6 +79,8 @@ while [[ -n "$1" ]]; do
shift
done
+m4_include(../scripts/library/term_colors.sh)
+
# see http://mywiki.wooledge.org/BashFAQ/020
while IFS= read -u 3 -r -d '' pacfile; do
file="${pacfile%.pac*}"