diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2011-08-17 10:01:06 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2011-08-17 10:03:56 +0200 |
commit | 8b8f3eee73063ae5c9843307c0bf4e9872aedd57 (patch) | |
tree | cbac3afe665a5b4de1d94056f240893a97bf54a1 | |
parent | f7cca160d35eff8c2f5e9dd810a34864611b9baa (diff) | |
download | ptxdist-8b8f3eee73063ae5c9843307c0bf4e9872aedd57.tar.gz ptxdist-8b8f3eee73063ae5c9843307c0bf4e9872aedd57.tar.xz |
git-ptx-patches: move longopt parsing in front of shortopts parsing
This fixes the following problem:
[frogger@hardanger:ncurses-5.9]$ git ptx-patches --force-remove
Found series file generated by git-ptx-patches.
/home/frogger/pengutronix/ptxdist/ptxdist/scripts/git-ptx-patches: illegal option -- -
/home/frogger/pengutronix/ptxdist/ptxdist/scripts/git-ptx-patches: illegal option -- o
/home/frogger/pengutronix/ptxdist/ptxdist/scripts/git-ptx-patches: illegal option -- r
/home/frogger/pengutronix/ptxdist/ptxdist/scripts/git-ptx-patches: illegal option -- c
/home/frogger/pengutronix/ptxdist/ptxdist/scripts/git-ptx-patches: illegal option -- e
/home/frogger/pengutronix/ptxdist/ptxdist/scripts/git-ptx-patches: illegal option -- -
/home/frogger/pengutronix/ptxdist/ptxdist/scripts/git-ptx-patches: illegal option -- r
/home/frogger/pengutronix/ptxdist/ptxdist/scripts/git-ptx-patches: illegal option -- e
/home/frogger/pengutronix/ptxdist/ptxdist/scripts/git-ptx-patches: illegal option -- m
/home/frogger/pengutronix/ptxdist/ptxdist/scripts/git-ptx-patches: illegal option -- o
/home/frogger/pengutronix/ptxdist/ptxdist/scripts/git-ptx-patches: illegal option -- v
/home/frogger/pengutronix/ptxdist/ptxdist/scripts/git-ptx-patches: illegal option -- e
Removing old patches (forced) ...
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rwxr-xr-x | scripts/git-ptx-patches | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/git-ptx-patches b/scripts/git-ptx-patches index 1ee788ad3..37f5d9119 100755 --- a/scripts/git-ptx-patches +++ b/scripts/git-ptx-patches @@ -32,6 +32,11 @@ if grep -q "$PTX_PATCHES_HEADER" .ptxdist/series; then fi fi +if [ "x$1" = "x--force-remove" ]; then + remove_old="force" + shift +fi + while getopts "ft:n:" opt; do case "${opt}" in f) @@ -45,11 +50,6 @@ while getopts "ft:n:" opt; do done shift $((${OPTIND} - 1)) -if [ "x$1" = "x--force-remove" ]; then - remove_old="force" - shift -fi - tag2=$(grep "#tag:" .ptxdist/series | awk "/#tag:${tag}/{if (getline) print \$1}" | sed 's,#tag:,,') range="${tag}..${tag2}" |