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>
This commit is contained in:
parent
e3cf64ad2f
commit
9974309cee
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue