summaryrefslogtreecommitdiff
path: root/makechrootpkg.in
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2017-03-07 19:27:36 +0100
committerJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2017-03-07 19:35:09 +0100
commit45f87aa9d5b44e4ff2f73be6597d4024bcded8e3 (patch)
tree70e691b68c47d7f794a096311ea7b102aa30228d /makechrootpkg.in
parent66553e7e07af9261e55c7c287615b61dc080593d (diff)
downloaddevtools32-45f87aa9d5b44e4ff2f73be6597d4024bcded8e3.tar.xz
lib/archroot.sh: Simplify check_root
Move the function and save the orig_argv right along it.
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r--makechrootpkg.in5
1 files changed, 2 insertions, 3 deletions
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")