1 |
Author: ulm |
2 |
Date: 2009-08-26 18:50:58 +0000 (Wed, 26 Aug 2009) |
3 |
New Revision: 1390 |
4 |
|
5 |
Modified: |
6 |
emacs-updater/ChangeLog |
7 |
emacs-updater/emacs-updater |
8 |
emacs-updater/emacs-updater.8 |
9 |
Log: |
10 |
New --major option. |
11 |
|
12 |
Modified: emacs-updater/ChangeLog |
13 |
=================================================================== |
14 |
--- emacs-updater/ChangeLog 2009-08-26 09:50:44 UTC (rev 1389) |
15 |
+++ emacs-updater/ChangeLog 2009-08-26 18:50:58 UTC (rev 1390) |
16 |
@@ -1,7 +1,8 @@ |
17 |
2009-08-25 Ulrich Mueller <ulm@g.o> |
18 |
|
19 |
- * emacs-updater (OPTIONS): New options --orphans|-o and --version. |
20 |
- (ORPHANS): New variable. |
21 |
+ * emacs-updater (OPTIONS): New options --major|-m, --orphans|-o, |
22 |
+ and --version. |
23 |
+ (MAJOR, ORPHANS): New variables. |
24 |
(version): New function. |
25 |
(usage): Update help text. |
26 |
* emacs-updater.8: Describe new options. |
27 |
|
28 |
Modified: emacs-updater/emacs-updater |
29 |
=================================================================== |
30 |
--- emacs-updater/emacs-updater 2009-08-26 09:50:44 UTC (rev 1389) |
31 |
+++ emacs-updater/emacs-updater 2009-08-26 18:50:58 UTC (rev 1390) |
32 |
@@ -19,6 +19,7 @@ |
33 |
|
34 |
# Other default variable settings |
35 |
EXACT= |
36 |
+MAJOR= |
37 |
NOCOLOUR= |
38 |
ORPHANS= |
39 |
PRETEND= |
40 |
@@ -39,6 +40,8 @@ |
41 |
X byte-compiled Elisp files |
42 |
X (default: sitedir,rebuild) |
43 |
X -e, --exact match exact versions when remerging packages |
44 |
+ X -m, --major use only the major version when comparing |
45 |
+ X Emacs version numbers |
46 |
X -n, --nocolour, --nocolor |
47 |
X disable colour in output |
48 |
X -o, --orphans list orphan files |
49 |
@@ -96,8 +99,8 @@ |
50 |
} |
51 |
|
52 |
# Read in all command-line options and force English output |
53 |
-OPTIONS=$(LC_ALL=C getopt -o a:ehnopP: \ |
54 |
- --long action:,exact,help,nocolour,nocolor,orphans,pretend \ |
55 |
+OPTIONS=$(LC_ALL=C getopt -o a:ehmnopP: \ |
56 |
+ --long action:,exact,help,major,nocolour,nocolor,orphans,pretend \ |
57 |
--long package-manager:,package-manager-command:,version \ |
58 |
-n 'emacs-updater' -- "$@") |
59 |
[ $? -eq 0 ] || usage 1 |
60 |
@@ -110,6 +113,7 @@ |
61 |
-h|--help) usage 0 ;; |
62 |
--version) version ;; |
63 |
-e|--exact) EXACT="true"; shift 1 ;; |
64 |
+ -m|--major) MAJOR="true"; shift 1 ;; |
65 |
-o|--orphans) ORPHANS="true"; shift 1 ;; |
66 |
-p|--pretend) PRETEND="true"; shift 1 ;; |
67 |
-n|--nocolour|--nocolor) NOCOLOUR="true"; shift 1 ;; |
68 |
@@ -147,6 +151,11 @@ |
69 |
;; |
70 |
--package-manager-command) PM_COMMAND=${2}; shift 2 ;; |
71 |
--) shift; break ;; |
72 |
+ *) |
73 |
+ # this should not happen; getopt should return bad status |
74 |
+ echo "Invalid option '${1}' given!" |
75 |
+ usage 22 |
76 |
+ ;; |
77 |
esac |
78 |
done |
79 |
|
80 |
@@ -223,7 +232,9 @@ |
81 |
version=$(bytecomp_version "${elc}") |
82 |
version=${version:-unknown} |
83 |
|
84 |
- if [ "${version}" != "${active}" ] || [ "${1}" = all ]; then |
85 |
+ if [ -z "${MAJOR}" -a "${version}" != "${active}" ] \ |
86 |
+ || [ "${version%%.*}" != "${active%%.*}" ] \ |
87 |
+ || [ "${1}" = all ]; then |
88 |
echo "Found ${elc##*/} (compiled by Emacs version ${version})" |
89 |
echo "${elc}" >> "${TMPFILE}" |
90 |
else |
91 |
|
92 |
Modified: emacs-updater/emacs-updater.8 |
93 |
=================================================================== |
94 |
--- emacs-updater/emacs-updater.8 2009-08-26 09:50:44 UTC (rev 1389) |
95 |
+++ emacs-updater/emacs-updater.8 2009-08-26 18:50:58 UTC (rev 1390) |
96 |
@@ -33,6 +33,9 @@ |
97 |
.B -e, --exact |
98 |
Match exact versions when remerging packages |
99 |
.TP |
100 |
+.B -m, --major |
101 |
+Use only the major version when comparing Emacs version numbers |
102 |
+.TP |
103 |
.B -n, --nocolour, --nocolor |
104 |
Disable colour in output |
105 |
.TP |