diff options
author | Dave Reisner <dreisner@archlinux.org> | 2014-10-19 16:06:31 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2014-10-19 16:48:03 -0400 |
commit | bf7dc83bab4f002a29866fd30b1574b6fbca36aa (patch) | |
tree | aad5aee7fe5d0840df6109eb86c42555cd9e4933 /makechrootpkg.in | |
parent | cae954ddb5d35877eaaea588b84f932863714568 (diff) |
save and reuse original argv when auto-elevating
Fixes FS#42277.
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r-- | makechrootpkg.in | 6 |
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" |