make pacman package mapping associative
This commit is contained in:
parent
762c879497
commit
80e4bcbf90
|
@ -333,10 +333,11 @@ function check_has_programs() {
|
||||||
&& 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
|
||||||
echo " ${failed[@]}" >&2
|
echo " ${failed[*]}" >&2
|
||||||
|
|
||||||
if type pacman &>/dev/null; then
|
if type pacman &>/dev/null; then
|
||||||
local pacman_packages=(
|
declare -A pacman_packages
|
||||||
|
pacman_packages=(
|
||||||
[ntpd]=openntpd
|
[ntpd]=openntpd
|
||||||
[zfs]=""
|
[zfs]=""
|
||||||
)
|
)
|
||||||
|
@ -345,7 +346,7 @@ function check_has_programs() {
|
||||||
local packages
|
local packages
|
||||||
local need_zfs=false
|
local need_zfs=false
|
||||||
for program in "${failed[@]}"; do
|
for program in "${failed[@]}"; do
|
||||||
if [[ -v pacman_packages[$program] ]]; then
|
if [[ -v "pacman_packages[$program]" ]]; then
|
||||||
packages+=("$program")
|
packages+=("$program")
|
||||||
else
|
else
|
||||||
# Assignments to the empty string are explcitly ignored,
|
# Assignments to the empty string are explcitly ignored,
|
||||||
|
|
Loading…
Reference in New Issue