diff options
author | Dave Reisner <dreisner@archlinux.org> | 2013-10-20 16:17:43 -0400 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-11-01 18:38:07 +0100 |
commit | 9974309cee341fd2e6638924a4918e332c67348e (patch) | |
tree | 3930e2d0b95493e4a51a6ae3ddfaac594cdb86be /makechrootpkg.in | |
parent | e3cf64ad2f83d979b8ca86445b612f5268725cb6 (diff) | |
download | devtools32-9974309cee341fd2e6638924a4918e332c67348e.tar.xz |
makechrootpkg: Look harder for -R argument
We shouldn't be in the business of reparsing makepkg's arguments, but
since we have to treat the case of repackaging separately, do a better
job of trying to find signs of it happening. This change lets you pass
the longopt, --repackage, or multiple shortopts such as -RA, and still
get the intended effect.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r-- | makechrootpkg.in | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in index 8c64ae1..00e538a 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -104,11 +104,13 @@ fi makepkg_args="$makepkg_args ${*:$OPTIND}" # See if -R was passed to makepkg -for arg in ${*:$OPTIND}; do - if [[ $arg = -R ]]; then - repack=true - break - fi +for arg in "${@:OPTIND}"; do + case ${arg%%=*} in + -*R*|--repackage) + repack=true + break 2 + ;; + esac done if [[ -n $SUDO_USER ]]; then |