makechrootpkg: fix short option handling for makepkg_args

Currently, when multiple short options are passed as a single argument,
only the one that matches the first case statement will be parsed. This
shall be fixed by using switch-case resume.
This commit is contained in:
Mike Yuan 2022-10-12 23:42:42 +08:00
parent 5d02c6df7f
commit d82bc69716
No known key found for this signature in database
GPG Key ID: 5A6360D78C6092C3
1 changed files with 3 additions and 3 deletions

View File

@ -311,14 +311,14 @@ fi
# Pass all arguments after -- right to makepkg
makepkg_args+=("${@:$OPTIND}")
# See if -R or -e was passed to makepkg
# See if -R, -e or -A was passed to makepkg
for arg in "${@:$OPTIND}"; do
case ${arg%%=*} in
--skip*|--holdver|--ignorearch) verifysource_args+=("$arg") ;;
--repackage|--noextract) keepbuilddir=1 ;;
--*) ;;
-*A*) verifysource_args+=(-A) ;;
-*R*|-*e*) keepbuilddir=1 ;;
-*A*) verifysource_args+=(-A) ;;&
-*R*|-*e*) keepbuilddir=1 ;;&
esac
done