From: "Sebastian Pipping" <sping@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/emacs-tools:backups/emacs-updater@1480 commit in: /
Date: Sun, 6 May 2012 16:07:21 +0000 (UTC) [thread overview]
Message-ID: <1239650917.3d54424fcc10b49b454e3c7cf47a88b831dbeb4a.sping@gentoo> (raw)
commit: 3d54424fcc10b49b454e3c7cf47a88b831dbeb4a
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 13 19:28:37 2009 +0000
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Mon Apr 13 19:28:37 2009 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs-tools.git;a=commit;h=3d54424f
Change initialisation of colours, since POSIX tput has no -S option.
svn path=/emacs-updater/; revision=1250
---
ChangeLog | 5 +++++
emacs-updater | 18 +++++++++---------
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0a4500f..867305a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-13 Ulrich Mueller <ulm@gentoo.org>
+
+ * emacs-updater (RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN):
+ Change initialisation, since POSIX tput has no -S option.
+
2009-04-11 Ulrich Mueller <ulm@gentoo.org>
* emacs-updater (have_portage, have_pkgcore, have_paludis):
diff --git a/emacs-updater b/emacs-updater
index c7c5510..d54809d 100755
--- a/emacs-updater
+++ b/emacs-updater
@@ -80,7 +80,7 @@ pm_auto() {
# Read in all command-line options and force English output
OPTIONS=$(LC_ALL=C getopt -o a:ehnpP: \
- --long action:,exact,help,nocolour,pretend,package-manager: \
+ --long action:,exact,help,nocolour,nocolor,pretend,package-manager: \
-n 'emacs-updater' -- "$@")
[ $? -eq 0 ] || usage 1
@@ -92,7 +92,7 @@ do
-h|--help) usage 0 ;;
-e|--exact) EXACT="true"; shift 1 ;;
-p|--pretend) PRETEND="true"; shift 1 ;;
- -n|--nocolour) NOCOLOUR="true"; shift 1 ;;
+ -n|--nocolour|--nocolor) NOCOLOUR="true"; shift 1 ;;
-a|--action)
ACTIONS=
for action in ${2/,/ }; do
@@ -133,16 +133,16 @@ done
# Only set colours if output is not redirected or the --no-colour
# option is not set
if [ -t 1 ] && [ -z "${NOCOLOUR}" ] ; then
- RED=$(tput -S <<<$'setaf 1\nbold')
- GREEN=$(tput -S <<<$'setaf 2\nbold')
- YELLOW=$(tput -S <<<$'setaf 3\nbold')
- BLUE=$(tput -S <<<$'setaf 4\nbold')
- MAGENTA=$(tput -S <<<$'setaf 5\nbold')
- CYAN=$(tput -S <<<$'setaf 6\nbold')
BOLD=$(tput bold)
NORMAL=$(tput sgr0)
+ RED=$(tput setaf 1)${BOLD}
+ GREEN=$(tput setaf 2)${BOLD}
+ YELLOW=$(tput setaf 3)${BOLD}
+ BLUE=$(tput setaf 4)${BOLD}
+ MAGENTA=$(tput setaf 5)${BOLD}
+ CYAN=$(tput setaf 6)${BOLD}
else
- RED=; GREEN=; YELLOW=; BLUE=; MAGENTA=; CYAN=; BOLD=; NORMAL=
+ BOLD=; NORMAL=; RED=; GREEN=; YELLOW=; BLUE=; MAGENTA=; CYAN=
fi
# Some type of output can be prettified and capsulated in functions
next reply other threads:[~2012-05-06 16:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-06 16:07 Sebastian Pipping [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-05-06 16:07 [gentoo-commits] proj/emacs-tools:backups/emacs-updater@1480 commit in: / Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:07 Sebastian Pipping
2012-05-06 16:06 [gentoo-commits] proj/emacs-tools:emacs-updater " Sebastian Pipping
2012-05-06 16:07 ` [gentoo-commits] proj/emacs-tools:backups/emacs-updater@1480 " Sebastian Pipping
2012-05-06 16:06 [gentoo-commits] proj/emacs-tools:emacs-updater " Sebastian Pipping
2012-05-06 16:07 ` [gentoo-commits] proj/emacs-tools:backups/emacs-updater@1480 " Sebastian Pipping
2012-05-06 16:06 [gentoo-commits] proj/emacs-tools:emacs-updater " Sebastian Pipping
2012-05-06 16:07 ` [gentoo-commits] proj/emacs-tools:backups/emacs-updater@1480 " Sebastian Pipping
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1239650917.3d54424fcc10b49b454e3c7cf47a88b831dbeb4a.sping@gentoo \
--to=sping@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox