From 45f87aa9d5b44e4ff2f73be6597d4024bcded8e3 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Tue, 7 Mar 2017 19:27:36 +0100 Subject: lib/archroot.sh: Simplify check_root Move the function and save the orig_argv right along it. --- makechrootpkg.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'makechrootpkg.in') diff --git a/makechrootpkg.in b/makechrootpkg.in index 79b387d..695b898 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -9,6 +9,7 @@ # GNU General Public License for more details. m4_include(lib/common.sh) +m4_include(lib/archroot.sh) shopt -s nullglob @@ -258,8 +259,6 @@ move_products() { } # }}} -orig_argv=("$@") - while getopts 'hcur:I:l:nTD:d:U:' arg; do case "$arg" in c) clean_first=true ;; @@ -279,7 +278,7 @@ done [[ ! -f PKGBUILD && -z "${install_pkgs[*]}" ]] && die 'This must be run in a directory containing a PKGBUILD.' [[ -n $makepkg_user && -z $(id -u "$makepkg_user") ]] && die 'Invalid makepkg user.' -check_root "$0" "${orig_argv[@]}" +check_root # Canonicalize chrootdir, getting rid of trailing / chrootdir=$(readlink -e "$passeddir") -- cgit v1.2.3-54-g00ecf