Skip to content

Commit

Permalink
Migrate git-quiltimport.sh to use git-rev-parse --parseopt
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Pierre Habouzit authored and Junio C Hamano committed Nov 6, 2007
1 parent 00df3be commit e01fbf1
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions git-quiltimport.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/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
. git-sh-setup

Expand All @@ -8,39 +15,25 @@ quilt_author=""
while test $# != 0
do
case "$1" in
--au=*|--aut=*|--auth=*|--autho=*|--author=*)
quilt_author=$(expr "z$1" : 'z-[^=]*\(.*\)')
shift
;;

--au|--aut|--auth|--autho|--author)
case "$#" in 1) usage ;; esac
--author)
shift
quilt_author="$1"
shift
;;

--dry-run)
shift
-n|--dry-run)
dry_run=1
;;

--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
--patches)
QUILT_PATCHES="$1"
shift
;;

--)
shift
break;;
*)
break
usage
;;
esac
shift
done

# Quilt Author
Expand Down

0 comments on commit e01fbf1

Please sign in to comment.