From d82bc697169558dcbb936f81c6451f9fb99199e1 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 12 Oct 2022 23:42:42 +0800 Subject: 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. --- src/makechrootpkg.in | 6 +++--- 1 file 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 -- cgit v1.2.3-70-g09d2