summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Chu <jchu@xentac.net>2007-11-04 15:01:22 -0800
committerJason Chu <jchu@xentac.net>2007-11-04 15:01:22 -0800
commit1e1e1e481e335988d00c842169966f0fa8cb43b3 (patch)
tree2eefec24eb5705ef58836b21098ac4fe7b06123b
parentbced48cecdabec12feb75f320a51650266ff3da2 (diff)
Accept options to makepkg after a -- so that we can accept longopts for makepkg and even options that are used by makechrootpkg
-rwxr-xr-xmakechrootpkg8
1 files changed, 7 insertions, 1 deletions
diff --git a/makechrootpkg b/makechrootpkg
index 879d932..e50d43e 100755
--- a/makechrootpkg
+++ b/makechrootpkg
@@ -29,7 +29,7 @@ fi
usage ()
{
- echo "usage ${APPNAME} [-h] [-c CHROOT_SHELL] [makepkg args]"
+ echo "usage ${APPNAME} [-h] [-c CHROOT_SHELL] [--] [makepkg args]"
echo " Run this script in a PKGBUILD dir to build a package inside a"
echo " clean chroot. All unrecognized arguments passed to this script"
echo " will be passed to makepkg."
@@ -43,6 +43,9 @@ usage ()
echo "command:"
echo " mkarchroot \$CHROOT_SHELL base base-devel sudo"
echo ""
+ echo "If you have problems passing params to makepkg or need to pass long"
+ echo "options, put -- between the makechrootpkg args and the makepkg args"
+ echo ""
echo "Default makepkg args: $MAKEPKG_ARGS"
exit 1
}
@@ -55,6 +58,9 @@ while getopts ':c:h' arg; do
esac
done
+# Pass all arguments after -- right to makepkg
+MAKEPKG_ARGS="$MAKEPKG_ARGS ${*:$OPTIND}"
+
if [ ! -d "$chrootdir" ]; then
echo "No \$CHROOT_SHELL defined, or invalid path"
exit 1