Update emacs-updater to version 0.6.
authorUlrich Müller <ulm@gentoo.org>
Sat, 8 Mar 2008 06:53:06 +0000 (06:53 +0000)
committerUlrich Müller <ulm@gentoo.org>
Sat, 8 Mar 2008 06:53:06 +0000 (06:53 +0000)
Package-Manager: portage-2.1.4.4

app-admin/eselect-emacs/ChangeLog
app-admin/eselect-emacs/Manifest
app-admin/eselect-emacs/files/emacs-updater

index 1cd5d4aaf939923f03f9333f88d5665d56d1d948..2b1b090fdf87a438529451c2e313385aa33cbca5 100644 (file)
@@ -1,6 +1,9 @@
 # ChangeLog for app-admin/eselect-emacs
 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-emacs/ChangeLog,v 1.40 2008/02/21 11:06:19 opfer Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-emacs/ChangeLog,v 1.41 2008/03/08 06:53:05 ulm Exp $
+
+  08 Mar 2008; Ulrich Mueller <ulm@gentoo.org> files/emacs-updater:
+  Update emacs-updater to version 0.6.
 
   21 Feb 2008; Christian Faulhammer <opfer@gentoo.org> files/emacs-updater:
   bump emacs-updater to version 0.4
index 5a7593d0e6d08e3fca6e4d0b4360968560f8704f..c9f365c404f131cabbdab333c38fc401389562f4 100644 (file)
@@ -1,15 +1,15 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-AUX emacs-updater 2297 RMD160 3801b7adf0aa71fd359fa4bfb2d8f25156243122 SHA1 404319daa6d786f3ff97ca0e8b6fb0f4376e33b5 SHA256 202eba514f18f1949784a3cff6d64a92df1cbe01972c037eb412a7ac413a79dd
+AUX emacs-updater 2880 RMD160 670ba0b40d7c957d1ebf7a61ef6f37205569a721 SHA1 f80a4a5127f1d54494a3b1f3e842f17bd96ba0a1 SHA256 dfdf65efad666f5133e9d2cfdefae31589618de1addd2ae3057cb708ce493f5e
 DIST eselect-emacs-1.3.tar.bz2 6597 RMD160 28552dc2e263bd26768120fc37433a14ee2feb12 SHA1 93b40064c5740d1f8c5d38e4a07d5062e2a3a22b SHA256 26ad557147a4bbf3757052d58c44874396a7724ea16af52c25e0df01f2178a29
 EBUILD eselect-emacs-1.3-r2.ebuild 961 RMD160 2e65d574a4a25b8fc4bd9f8ec0598f2bb7616405 SHA1 58f422538dff2fc2049c72b826f30820e02da535 SHA256 d0daaa12e68cefbd43c4d1b920acdc1fe185d6e95b9abb60dd05f05097dcbd37
-MISC ChangeLog 5639 RMD160 5e909e4d2fc55863b52b6bb3418f21c10b6672a8 SHA1 12a7a72bd8fd468ab30b4ce38f400d5af3666e3c SHA256 ab21c14c8db5573ec5cb8fc5cfec825440fef735e756eba0bed505f4ebc0e886
+MISC ChangeLog 5745 RMD160 f09f32670f060c165ca3048064439960671b685f SHA1 63e391244af63e175b53c79fadffb42017250f93 SHA256 2870cca566593f9d186d3f48744117ef5615a5471ea6d83d627e8e5d024e4ae2
 MISC metadata.xml 158 RMD160 415d172437ca754d24fc5ab186ba8e77934d96e4 SHA1 61f6eff9729cd87a725c2a70c81aca4270a17fc4 SHA256 1393bdef3a74343fdb40a112c7096a1af16f67e7a43413250de28dfe73810eab
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.7 (GNU/Linux)
+Version: GnuPG v1.4.8 (GNU/Linux)
 
-iD8DBQFHvVuYNQqtfCuFneMRAnxZAJ9hiX2JuCU0pUDqsnJX/VvwtH76jgCeKmlU
-LbokCK2DsyKiBSYYb9lPTYY=
-=6+Dh
+iEYEARECAAYFAkfSN6gACgkQOeoy/oIi7uxY4wCgjCQDPl8G/6x37ly860zynTcH
+GiQAoMUXzyc0B+nTzn1q9bw9XcffngiJ
+=IoXp
 -----END PGP SIGNATURE-----
index 51e09ebdfcdf2d0aedc76da51f89092f46e58707..7f94d97f1fbc848fa3a3965726875c8e476238fb 100755 (executable)
@@ -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 @@ Find packages that are installed in the wrong location
 
 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 @@ if [ ! -s "${TMPFILE}" ]; then
     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