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. --- arch-nspawn.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch-nspawn.in') diff --git a/arch-nspawn.in b/arch-nspawn.in index 5c0f46f..5d5620d 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -25,8 +25,6 @@ usage() { exit 1 } -orig_argv=("$@") - while getopts 'hC:M:c:' arg; do case "$arg" in C) pac_conf="$OPTARG" ;; @@ -39,7 +37,7 @@ done shift $(($OPTIND - 1)) (( $# < 1 )) && die 'You must specify a directory.' -check_root "$0" "${orig_argv[@]}" +check_root working_dir=$(readlink -f "$1") shift 1 -- cgit v1.2.3-70-g09d2