summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--makechrootpkg.in12
1 files changed, 7 insertions, 5 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index 8c64ae1..00e538a 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -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