summaryrefslogtreecommitdiff
path: root/mkarchroot.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 /mkarchroot.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 'mkarchroot.in')
-rw-r--r--mkarchroot.in4
1 files changed, 1 insertions, 3 deletions
diff --git a/mkarchroot.in b/mkarchroot.in
index e03b4f9..010de3c 100644
--- a/mkarchroot.in
+++ b/mkarchroot.in
@@ -23,8 +23,6 @@ usage() {
exit 1
}
-orig_argv=("$@")
-
while getopts 'hC:M:c:' arg; do
case "$arg" in
C) pac_conf="$OPTARG" ;;
@@ -38,7 +36,7 @@ shift $(($OPTIND - 1))
(( $# < 2 )) && die 'You must specify a directory and one or more packages.'
-check_root "$0" "${orig_argv[@]}"
+check_root
working_dir="$(readlink -f $1)"
shift 1