diff --git a/scripts/functions.sh b/scripts/functions.sh index dad50c1..58f2d96 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -54,18 +54,18 @@ function preprocess_config() { function prepare_installation_environment() { einfo "Preparing installation environment" - local needed_programs=() - - needed_programs+=(gpg) - needed_programs+=(hwclock) - needed_programs+=(lsblk) - needed_programs+=(ntpd) - needed_programs+=(partprobe) - needed_programs+=(python3) - needed_programs+=(rhash) - needed_programs+=(sgdisk) - needed_programs+=(uuidgen) - needed_programs+=(wget) + local needed_programs=( + gpg + hwclock + lsblk + ntpd + partprobe + python3 + rhash + sgdisk + uuidgen + wget + ) [[ $USED_BTRFS == "true" ]] \ && needed_programs+=(btrfs) diff --git a/scripts/utils.sh b/scripts/utils.sh index e0042f0..1d29432 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -322,6 +322,7 @@ function parse_arguments() { } function check_has_programs() { + echo "$@" local failed=() local program for program in "$@"; do @@ -329,7 +330,7 @@ function check_has_programs() { || failed+=("$program") done - [[ ${#failed[@]} -eq 0 ]] \ + [[ "${#failed[@]}" -eq 0 ]] \ && return echo "The following programs are required for the installer to work, but are currently missing on your system:" >&2