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. --- archbuild.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'archbuild.in') diff --git a/archbuild.in b/archbuild.in index 9c5d706..4fb33c3 100644 --- a/archbuild.in +++ b/archbuild.in @@ -1,6 +1,7 @@ #!/bin/bash m4_include(lib/common.sh) +m4_include(lib/archroot.sh) base_packages=(base-devel) makechrootpkg_args=(-c -n) @@ -29,8 +30,6 @@ usage() { exit 1 } -orig_argv=("$@") - while getopts 'hcr:' arg; do case "${arg}" in c) clean_first=true ;; @@ -39,7 +38,7 @@ while getopts 'hcr:' arg; do esac done -check_root "$0" "${orig_argv[@]}" +check_root # Pass all arguments after -- right to makepkg makechrootpkg_args+=("${@:$OPTIND}") -- cgit v1.2.3-70-g09d2