* [gentoo-commits] emacs r1250 - emacs-updater
@ 2009-04-13 19:28 Ulrich Mueller (ulm)
0 siblings, 0 replies; only message in thread
From: Ulrich Mueller (ulm) @ 2009-04-13 19:28 UTC (permalink / raw
To: gentoo-commits
Author: ulm
Date: 2009-04-13 19:28:37 +0000 (Mon, 13 Apr 2009)
New Revision: 1250
Modified:
emacs-updater/ChangeLog
emacs-updater/emacs-updater
Log:
Change initialisation of colours, since POSIX tput has no -S option.
Modified: emacs-updater/ChangeLog
===================================================================
--- emacs-updater/ChangeLog 2009-04-13 08:07:49 UTC (rev 1249)
+++ emacs-updater/ChangeLog 2009-04-13 19:28:37 UTC (rev 1250)
@@ -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):
Modified: emacs-updater/emacs-updater
===================================================================
--- emacs-updater/emacs-updater 2009-04-13 08:07:49 UTC (rev 1249)
+++ emacs-updater/emacs-updater 2009-04-13 19:28:37 UTC (rev 1250)
@@ -80,7 +80,7 @@
# 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 @@
-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 @@
# 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-13 19:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-13 19:28 [gentoo-commits] emacs r1250 - emacs-updater Ulrich Mueller (ulm)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox