[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 1a04d95: automerge: adjust meaning of -d option
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] master 1a04d95: automerge: adjust meaning of -d option |
Date: |
Wed, 31 Jan 2018 16:15:45 -0500 (EST) |
branch: master
commit 1a04d95266af94f578e9d96676e6adc44c602306
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
automerge: adjust meaning of -d option
* admin/automerge (nocd): New variable, replacing $dir.
(usage, -d): Option -d no longer takes an argument.
---
admin/automerge | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/admin/automerge b/admin/automerge
index 6182ad0..18f8c75 100755
--- a/admin/automerge
+++ b/admin/automerge
@@ -31,8 +31,8 @@
##
## Modifying a running shell script can have unpredictable results,
## so the paranoid will first make a copy of this script, and then run
-## it with the -d option to point to the repository directory, in case
-## a pull updates this script while it is working.
+## it with the -d option in the repository directory, in case a pull
+## updates this script while it is working.
die () # write error to stderr and exit
{
@@ -48,11 +48,11 @@ PD=${0%/*}
usage ()
{
cat 1>&2 <<EOF
-Usage: ${PN} [-b] [-d dir] [-e emacs] [-n nmin] [-p] [-r] [-t] [-- mflags]
+Usage: ${PN} [-b] [-d] [-e emacs] [-n nmin] [-p] [-r] [-t] [-- mflags]
Merge the Emacs release branch to master.
Passes any non-option args to make (eg -- -j2).
Options:
--d: directory to work in (default is parent directory of this script)
+-d: no initial cd to parent of script directory
-e: Emacs executable to use for the initial merge (default $emacs)
-n: minimum number of commits to try merging (default $nmin)
-b: try to build after merging
@@ -73,15 +73,15 @@ test=
push=
quiet=
reset=
-dir=
+nocd=
-while getopts ":hbd:e:n:pqrt" option ; do
+while getopts ":hbde:n:pqrt" option ; do
case $option in
(h) usage ;;
(b) build=1 ;;
- (d) dir=$OPTARG ;;
+ (d) nocd=1 ;;
(e) emacs=$OPTARG ;;
@@ -106,12 +106,10 @@ shift $(( --OPTIND ))
OPTIND=1
-if [ "$dir" ]; then
- cd "$dir" || die
-else
+[ "$nocd" ] || {
cd $PD # this should be the admin directory
cd ../
-fi
+}
[ -d admin ] || die "Could not locate admin directory"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 1a04d95: automerge: adjust meaning of -d option,
Glenn Morris <=