Migrate git-quiltimport.sh to use git-rev-parse --parseopt
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Pierre Habouzit committed
Nov 4, 2007 at 11:31 UTC
e01fbf1a8f185bf6722e828286862a4122269ef7
1 file changed
+16
-23
git-quiltimport.sh
+16
-23
@@ -1,5 +1,12 @@
1
#!/bin/sh
2
-USAGE='--dry-run --author <author> --patches </path/to/quilt/patch/directory>'
2
+OPTIONS_KEEPDASHDASH=
3
+OPTIONS_SPEC="\
4
+git-quiltimport [options]
5
+--
6
+n,dry-run dry run
7
+author= author name and email address for patches without any
8
+patches= path to the quilt series and patches
9
+"
10
SUBDIRECTORY_ON=Yes
11
. git-sh-setup
12
@@ -8,39 +15,25 @@ quilt_author=""
15
while test $# != 0
16
do
17
case "$1" in
11
- --au=*|--aut=*|--auth=*|--autho=*|--author=*)
12
- quilt_author=$(expr "z$1" : 'z-[^=]*\(.*\)')
13
- shift
14
- ;;
15
-
16
- --au|--aut|--auth|--autho|--author)
17
- case "$#" in 1) usage ;; esac
18
+ --author)
19
shift
20
quilt_author="$1"
20
- shift
21
;;
22
-
23
- --dry-run)
24
- shift
22
+ -n|--dry-run)
23
dry_run=1
24
;;
27
-
28
- --pa=*|--pat=*|--patc=*|--patch=*|--patche=*|--patches=*)
29
- QUILT_PATCHES=$(expr "z$1" : 'z-[^=]*\(.*\)')
30
- shift
31
- ;;
32
-
33
- --pa|--pat|--patc|--patch|--patche|--patches)
34
- case "$#" in 1) usage ;; esac
35
- shift
25
+ --patches)
26
QUILT_PATCHES="$1"
27
shift
28
;;
39
-
29
+ --)
30
+ shift
31
+ break;;
32
*)
41
- break
33
+ usage
34
;;
35
esac
36
+ shift
37
done
38
39
# Quilt Author