summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2022-10-12 23:42:42 +0800
committerMike Yuan <me@yhndnzj.com>2022-10-13 00:10:17 +0800
commitd82bc697169558dcbb936f81c6451f9fb99199e1 (patch)
tree4021d872ec3078ce4aa7c1811093437e44aba358
parent5d02c6df7f9cd3a2820149886e8a32e7d8e7a566 (diff)
downloaddevtools-d82bc697169558dcbb936f81c6451f9fb99199e1.tar.xz
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.
-rw-r--r--src/makechrootpkg.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/makechrootpkg.in b/src/makechrootpkg.in
index f9a9289..895c1de 100644
--- a/src/makechrootpkg.in
+++ b/src/makechrootpkg.in
@@ -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