* [gentoo-commits] gentoo-x86 commit in app-admin/eselect-emacs/files: emacs-updater
@ 2008-02-21 11:06 Christian Faulhammer (opfer)
0 siblings, 0 replies; 4+ messages in thread
From: Christian Faulhammer (opfer) @ 2008-02-21 11:06 UTC (permalink / raw
To: gentoo-commits
opfer 08/02/21 11:06:20
Modified: emacs-updater
Log:
bump emacs-updater to version 0.4
(Portage version: 2.1.4.4)
Revision Changes Path
1.2 app-admin/eselect-emacs/files/emacs-updater
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-emacs/files/emacs-updater?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-emacs/files/emacs-updater?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-emacs/files/emacs-updater?r1=1.1&r2=1.2
Index: emacs-updater
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-admin/eselect-emacs/files/emacs-updater,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- emacs-updater 9 Jan 2008 15:47:17 -0000 1.1
+++ emacs-updater 21 Feb 2008 11:06:20 -0000 1.2
@@ -5,8 +5,37 @@
# Christian Faulhammer <opfer@gentoo.org>
# Ulrich Mueller <ulm@gentoo.org>
-# Only set colours if output is not redirected
-if tty -s <&1; then
+VERSION=0.4
+SITELISP=/usr/share/emacs/site-lisp
+TMPFILE="$(mktemp /tmp/emacs-updater.XXXXXX)"
+
+cat <<-EOF
+
+Emacs updater version ${VERSION}
+Written by the Gentoo Emacs team http://www.gentoo.org/proj/en/lisp/emacs/
+Find packages that are installed in the wrong location
+
+EOF
+
+# Read in all command-line options and force English output
+OPTIONS=$(LC_ALL=C getopt -o hpn --long help,pretend,nocolour \
+ -n 'emacs-updater' -- "$@")
+
+eval set -- "${OPTIONS}"
+
+while true
+do
+ case "${1}" in
+ -h|--help) echo "You have the following options: --pretend|-p and/or --no-colour|-n" ; exit 0 ;;
+ -p|--pretend) PRETEND="true"; shift 1 ;;
+ -n|--nocolour) NOCOLOUR="true"; shift 1;;
+ --) shift ; break ;;
+ esac
+done
+
+# Only set colours if output is not redirected or the --no-colour
+# option is not set
+if tty -s <&1 && [ -z ${NOCOLOUR} ] ; then
BLUE=$'\e[34;01m'
GREEN=$'\e[32;01m'
RED=$'\e[31;01m'
@@ -16,11 +45,6 @@
NORMAL=$'\e[0m'
fi
-SITELISP=/usr/share/emacs/site-lisp
-VERSION=0.3
-TMPFILE="$(mktemp /tmp/emacs-updater.XXXXXX)"
-
-
message() {
local OUTPUT=$@
echo "${GREEN}*${NORMAL}${BOLD} ${OUTPUT}${NORMAL}"
@@ -36,14 +60,6 @@
echo "${RED}*${NORMAL}${BOLD} ${OUTPUT}${NORMAL}"
}
-cat <<-EOF
-
-Emacs updater version ${VERSION}
-Written by the Gentoo Emacs team http://www.gentoo.org/proj/en/lisp/emacs/
-Find packages that are installed in the wrong location
-
-EOF
-
if ! [ -x /usr/bin/qfile ]; then
echo
failure "Please emerge app-portage/portage-utils to use this tool"
@@ -66,14 +82,18 @@
message "Packages with site files in the wrong location:"
cat "${TMPFILE}"
+if [ ${PRETEND} ]; then
+ exit 3
+fi
+
echo
echo -n "${BOLD}Remerge packages?${NORMAL} [${GREEN}Yes${NORMAL}/${RED}No${NORMAL}] "
read choice
echo
case "${choice}" in
- y*|Y*|"")
- ;;
- *)
+ y*|Y*|"")
+ ;;
+ *)
warning "Quitting."
exit 10 ;;
esac
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-commits] gentoo-x86 commit in app-admin/eselect-emacs/files: emacs-updater
@ 2008-03-08 6:53 Ulrich Mueller (ulm)
0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Mueller (ulm) @ 2008-03-08 6:53 UTC (permalink / raw
To: gentoo-commits
ulm 08/03/08 06:53:06
Modified: emacs-updater
Log:
Update emacs-updater to version 0.6.
(Portage version: 2.1.4.4)
Revision Changes Path
1.3 app-admin/eselect-emacs/files/emacs-updater
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-emacs/files/emacs-updater?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-emacs/files/emacs-updater?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-emacs/files/emacs-updater?r1=1.2&r2=1.3
Index: emacs-updater
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-admin/eselect-emacs/files/emacs-updater,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- emacs-updater 21 Feb 2008 11:06:20 -0000 1.2
+++ emacs-updater 8 Mar 2008 06:53:06 -0000 1.3
@@ -1,11 +1,14 @@
#!/bin/bash
-# Licensed under GPL version 2
+# Copyright 2007-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: emacs-updater,v 1.3 2008/03/08 06:53:06 ulm Exp $
+
# Authors:
# Christian Faulhammer <opfer@gentoo.org>
# Ulrich Mueller <ulm@gentoo.org>
-VERSION=0.4
+VERSION=0.6
SITELISP=/usr/share/emacs/site-lisp
TMPFILE="$(mktemp /tmp/emacs-updater.XXXXXX)"
@@ -17,32 +20,44 @@
EOF
+usage() {
+ sed -e 's/^X//' <<-EOF
+ Usage: ${0##*/} [OPTION]...
+ X -n, --nocolour disable colour in output
+ X -p, --pretend don't actually emerge packages
+ X -h, --help display this help and exit
+ EOF
+ exit ${1}
+}
+
# Read in all command-line options and force English output
OPTIONS=$(LC_ALL=C getopt -o hpn --long help,pretend,nocolour \
-n 'emacs-updater' -- "$@")
+[ $? -eq 0 ] || usage 1
eval set -- "${OPTIONS}"
while true
do
case "${1}" in
- -h|--help) echo "You have the following options: --pretend|-p and/or --no-colour|-n" ; exit 0 ;;
- -p|--pretend) PRETEND="true"; shift 1 ;;
- -n|--nocolour) NOCOLOUR="true"; shift 1;;
- --) shift ; break ;;
+ -h|--help) usage 0 ;;
+ -p|--pretend) PRETEND="true"; shift 1 ;;
+ -n|--nocolour) NOCOLOUR="true"; shift 1 ;;
+ --) shift; break ;;
esac
done
# Only set colours if output is not redirected or the --no-colour
# option is not set
-if tty -s <&1 && [ -z ${NOCOLOUR} ] ; then
- BLUE=$'\e[34;01m'
- GREEN=$'\e[32;01m'
- RED=$'\e[31;01m'
- YELLOW=$'\e[33;01m'
- CYAN=$'\e[36;01m'
- BOLD=$'\e[0;01m'
- NORMAL=$'\e[0m'
+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)
fi
message() {
@@ -79,10 +94,13 @@
exit 2
fi
-message "Packages with site files in the wrong location:"
+NO_OF_PACKAGES=$(sed -n '$=' "${TMPFILE}")
+
+[ ${NO_OF_PACKAGES} -eq 1 ] && s= || s=s
+message "${NO_OF_PACKAGES} package${s} with site files in the wrong location:"
cat "${TMPFILE}"
-if [ ${PRETEND} ]; then
+if [ "${PRETEND}" ]; then
exit 3
fi
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-commits] gentoo-x86 commit in app-admin/eselect-emacs/files: emacs-updater
@ 2008-05-25 17:26 Ulrich Mueller (ulm)
0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Mueller (ulm) @ 2008-05-25 17:26 UTC (permalink / raw
To: gentoo-commits
ulm 08/05/25 17:26:29
Modified: emacs-updater
Log:
Version bump.
(Portage version: 2.1.5.2)
Revision Changes Path
1.4 app-admin/eselect-emacs/files/emacs-updater
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-emacs/files/emacs-updater?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-emacs/files/emacs-updater?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-emacs/files/emacs-updater?r1=1.3&r2=1.4
Index: emacs-updater
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-admin/eselect-emacs/files/emacs-updater,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- emacs-updater 8 Mar 2008 06:53:06 -0000 1.3
+++ emacs-updater 25 May 2008 17:26:28 -0000 1.4
@@ -2,7 +2,7 @@
# Copyright 2007-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id: emacs-updater,v 1.3 2008/03/08 06:53:06 ulm Exp $
+# $Id: emacs-updater,v 1.4 2008/05/25 17:26:28 ulm Exp $
# Authors:
# Christian Faulhammer <opfer@gentoo.org>
@@ -60,6 +60,7 @@
NORMAL=$(tput sgr0)
fi
+# Some type of output can be prettified and capsulated in functions
message() {
local OUTPUT=$@
echo "${GREEN}*${NORMAL}${BOLD} ${OUTPUT}${NORMAL}"
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-commits] gentoo-x86 commit in app-admin/eselect-emacs/files: emacs-updater
@ 2008-10-25 23:18 Ulrich Mueller (ulm)
0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Mueller (ulm) @ 2008-10-25 23:18 UTC (permalink / raw
To: gentoo-commits
ulm 08/10/25 23:18:45
Removed: emacs-updater
Log:
Remove old.
(Portage version: 2.2_rc12/cvs/Linux 2.6.26-gentoo-r1 i686)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-25 23:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-08 6:53 [gentoo-commits] gentoo-x86 commit in app-admin/eselect-emacs/files: emacs-updater Ulrich Mueller (ulm)
-- strict thread matches above, loose matches on Subject: below --
2008-10-25 23:18 Ulrich Mueller (ulm)
2008-05-25 17:26 Ulrich Mueller (ulm)
2008-02-21 11:06 Christian Faulhammer (opfer)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox