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>
This commit is contained in:
Pierre Habouzit
2007-11-04 11:31:01 +01:00
committed by Junio C Hamano
parent 00df3bed2b
commit e01fbf1a8f

View File

@@ -1,5 +1,12 @@
#!/bin/sh #!/bin/sh
USAGE='--dry-run --author <author> --patches </path/to/quilt/patch/directory>' OPTIONS_KEEPDASHDASH=
OPTIONS_SPEC="\
git-quiltimport [options]
--
n,dry-run dry run
author= author name and email address for patches without any
patches= path to the quilt series and patches
"
SUBDIRECTORY_ON=Yes SUBDIRECTORY_ON=Yes
. git-sh-setup . git-sh-setup
@@ -8,39 +15,25 @@ quilt_author=""
while test $# != 0 while test $# != 0
do do
case "$1" in case "$1" in
--au=*|--aut=*|--auth=*|--autho=*|--author=*) --author)
quilt_author=$(expr "z$1" : 'z-[^=]*\(.*\)')
shift
;;
--au|--aut|--auth|--autho|--author)
case "$#" in 1) usage ;; esac
shift shift
quilt_author="$1" quilt_author="$1"
shift
;; ;;
-n|--dry-run)
--dry-run)
shift
dry_run=1 dry_run=1
;; ;;
--patches)
--pa=*|--pat=*|--patc=*|--patch=*|--patche=*|--patches=*)
QUILT_PATCHES=$(expr "z$1" : 'z-[^=]*\(.*\)')
shift
;;
--pa|--pat|--patc|--patch|--patche|--patches)
case "$#" in 1) usage ;; esac
shift
QUILT_PATCHES="$1" QUILT_PATCHES="$1"
shift shift
;; ;;
--)
shift
break;;
*) *)
break usage
;; ;;
esac esac
shift
done done
# Quilt Author # Quilt Author