Commit 9974309c authored by Dave Reisner's avatar Dave Reisner Committed by Pierre Schmitz
Browse files

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: default avatarDave Reisner <dreisner@archlinux.org>
Signed-off-by: default avatarPierre Schmitz <pierre@archlinux.de>
parent e3cf64ad
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -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
for arg in "${@:OPTIND}"; do
	case ${arg%%=*} in
		-*R*|--repackage)
			repack=true
		break
	fi
			break 2
			;;
	esac
done

if [[ -n $SUDO_USER ]]; then