1 |
Author: ulm |
2 |
Date: 2009-08-24 21:14:37 +0000 (Mon, 24 Aug 2009) |
3 |
New Revision: 1363 |
4 |
|
5 |
Modified: |
6 |
emacs-updater/emacs-updater |
7 |
emacs-updater/emacs-updater.8 |
8 |
Log: |
9 |
New --version option. |
10 |
|
11 |
Modified: emacs-updater/emacs-updater |
12 |
=================================================================== |
13 |
--- emacs-updater/emacs-updater 2009-08-23 16:01:08 UTC (rev 1362) |
14 |
+++ emacs-updater/emacs-updater 2009-08-24 21:14:37 UTC (rev 1363) |
15 |
@@ -22,18 +22,12 @@ |
16 |
NOCOLOUR= |
17 |
PRETEND= |
18 |
|
19 |
-cat <<-EOF |
20 |
- |
21 |
-Emacs updater version ${VERSION} |
22 |
-Written by the Gentoo Emacs team http://www.gentoo.org/proj/en/lisp/emacs/ |
23 |
-Find packages that are installed in the wrong location or rebuild all |
24 |
-GNU Emacs packages |
25 |
- |
26 |
-EOF |
27 |
- |
28 |
usage() { |
29 |
sed -e 's/^X//' <<-EOF |
30 |
Usage: ${0##*/} [OPTION]... |
31 |
+ Rebuild Emacs packages that were compiled by another Emacs version, |
32 |
+ or that are installed in the wrong location. |
33 |
+ X |
34 |
X -a, --action ACTION[,ACTION]... |
35 |
X specify actions, comma-separated list of: |
36 |
X 'sitedir': find site-init files not in the |
37 |
@@ -56,10 +50,22 @@ |
38 |
X manager command. If CMD includes options |
39 |
X the whole command string must be quoted |
40 |
X -h, --help display this help and exit |
41 |
+ X --version output version information and exit |
42 |
EOF |
43 |
exit ${1} |
44 |
} |
45 |
|
46 |
+version() { |
47 |
+ cat <<-EOF |
48 |
+ Emacs updater version ${VERSION} |
49 |
+ Copyright 2007-2009 Gentoo Foundation. |
50 |
+ Distributed under the terms of the GNU General Public License v2. |
51 |
+ |
52 |
+ Gentoo Emacs project: <http://www.gentoo.org/proj/en/lisp/emacs/> |
53 |
+ EOF |
54 |
+ exit |
55 |
+} |
56 |
+ |
57 |
# Wrapper for package manager commands |
58 |
have_portage() { type -P emerge >/dev/null; } |
59 |
pm_portage() { emerge --oneshot --ask --verbose "$@"; } |
60 |
@@ -90,7 +96,7 @@ |
61 |
# Read in all command-line options and force English output |
62 |
OPTIONS=$(LC_ALL=C getopt -o a:ehnpP: \ |
63 |
--long action:,exact,help,nocolour,nocolor,pretend \ |
64 |
- --long package-manager:,package-manager-command: \ |
65 |
+ --long package-manager:,package-manager-command:,version \ |
66 |
-n 'emacs-updater' -- "$@") |
67 |
[ $? -eq 0 ] || usage 1 |
68 |
|
69 |
@@ -100,6 +106,7 @@ |
70 |
do |
71 |
case "${1}" in |
72 |
-h|--help) usage 0 ;; |
73 |
+ --version) version ;; |
74 |
-e|--exact) EXACT="true"; shift 1 ;; |
75 |
-p|--pretend) PRETEND="true"; shift 1 ;; |
76 |
-n|--nocolour|--nocolor) NOCOLOUR="true"; shift 1 ;; |
77 |
|
78 |
Modified: emacs-updater/emacs-updater.8 |
79 |
=================================================================== |
80 |
--- emacs-updater/emacs-updater.8 2009-08-23 16:01:08 UTC (rev 1362) |
81 |
+++ emacs-updater/emacs-updater.8 2009-08-24 21:14:37 UTC (rev 1363) |
82 |
@@ -62,6 +62,9 @@ |
83 |
.TP |
84 |
.B -h, --help |
85 |
Display help and exit |
86 |
+.TP |
87 |
+.B --version |
88 |
+Output version information and exit |
89 |
.SH ENVIRONMENT |
90 |
.TP |
91 |
.B PACKAGE_MANAGER |