From b001c995498319ba8769662a26e6fbf8cf31355d Mon Sep 17 00:00:00 2001 From: teldra Date: Tue, 16 Mar 2021 22:46:00 +0100 Subject: [PATCH] small fixes --- run_in_chroot.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/run_in_chroot.sh b/run_in_chroot.sh index 5f6c753..d2bf65e 100755 --- a/run_in_chroot.sh +++ b/run_in_chroot.sh @@ -14,14 +14,18 @@ declare -A users=() source "${functions}"/functions for i in $(find "${vars}" -type f); do - echo "${i}" source "${i}" done cfg+=( [diskpw]="${1}" ) input="${@}" for i in $(seq 1 "${#input[@]}"); do - [[ ! "${i}" == "1" ]] && users+=( [pw$i]="${input[$i]}" ) + if [[ "${i}" == "1" ]]; then + cfg+=( [diskpw]="${1}" ) + else + c="$(( i - 1 ))" + users+=( [pw$c]="${input[$c]}" ) + fi done export run="install"