add program check debug

This commit is contained in:
oddlama 2021-05-29 22:23:18 +02:00
parent a6023eba13
commit f03f4a99ab
No known key found for this signature in database
GPG Key ID: 14EFE510775FE39A
2 changed files with 14 additions and 13 deletions

View File

@ -54,18 +54,18 @@ function preprocess_config() {
function prepare_installation_environment() { function prepare_installation_environment() {
einfo "Preparing installation environment" einfo "Preparing installation environment"
local needed_programs=() local needed_programs=(
gpg
needed_programs+=(gpg) hwclock
needed_programs+=(hwclock) lsblk
needed_programs+=(lsblk) ntpd
needed_programs+=(ntpd) partprobe
needed_programs+=(partprobe) python3
needed_programs+=(python3) rhash
needed_programs+=(rhash) sgdisk
needed_programs+=(sgdisk) uuidgen
needed_programs+=(uuidgen) wget
needed_programs+=(wget) )
[[ $USED_BTRFS == "true" ]] \ [[ $USED_BTRFS == "true" ]] \
&& needed_programs+=(btrfs) && needed_programs+=(btrfs)

View File

@ -322,6 +322,7 @@ function parse_arguments() {
} }
function check_has_programs() { function check_has_programs() {
echo "$@"
local failed=() local failed=()
local program local program
for program in "$@"; do for program in "$@"; do
@ -329,7 +330,7 @@ function check_has_programs() {
|| failed+=("$program") || failed+=("$program")
done done
[[ ${#failed[@]} -eq 0 ]] \ [[ "${#failed[@]}" -eq 0 ]] \
&& return && return
echo "The following programs are required for the installer to work, but are currently missing on your system:" >&2 echo "The following programs are required for the installer to work, but are currently missing on your system:" >&2