summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in
index a340116..8957974 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -66,6 +66,8 @@ usage() {
exit 1
}
+orig_argv=("$@")
+
while getopts 'hcur:I:l:nTD:d:' arg; do
case "$arg" in
h) usage ;;
@@ -81,10 +83,10 @@ while getopts 'hcur:I:l:nTD:d:' arg; do
esac
done
-check_root "$0" "$@"
-
[[ ! -f PKGBUILD && -z "${install_pkgs[*]}" ]] && die 'This must be run in a directory containing a PKGBUILD.'
+check_root "$0" "${orig_argv[@]}"
+
# Canonicalize chrootdir, getting rid of trailing /
chrootdir=$(readlink -e "$passeddir")
[[ ! -d $chrootdir ]] && die "No chroot dir defined, or invalid path '%s'" "$passeddir"