@@ -23,10 +23,10 @@ function base_install() {
2323 name=" ${categories[$i]} "
2424 orig=" ${orig_keys[$i]} "
2525
26- # materialize the dynamically-named array into pkgs[]
27- eval ' pkgs=( "${ ' " $ name" ' [@]}" ) '
26+ # pull the list items from YAML into pkgs[] (no eval, no mutation)
27+ mapfile -t pkgs < <( collect_yaml_lists " $name " " $CONFIG_YAML " )
2828
29- [ ${# pkgs[@]} -eq 0 ] && continue
29+ (( ${# pkgs[@]} )) || continue
3030
3131 case " $orig " in
3232 base-ubuntu)
@@ -36,7 +36,7 @@ function base_install() {
3636 _do pac_install " ${pkgs[@]} "
3737 ;;
3838 base-phone)
39- _do pkg_install " ${pkg [@]} "
39+ _do pkg_install " ${pkgs [@]} "
4040 ;;
4141 esac
4242 done
@@ -54,10 +54,10 @@ function base_install() {
5454 name=" ${categories[$i]} "
5555 orig=" ${orig_keys[$i]} "
5656
57- # materialize the dynamically-named array into pkgs[]
58- eval ' pkgs=( "${ ' " $ name" ' [@]}" ) '
57+ # pull the list items from YAML into pkgs[] (no eval, no mutation)
58+ mapfile -t pkgs < <( collect_yaml_lists " $name " " $CONFIG_YAML " )
5959
60- [ ${# pkgs[@]} -eq 0 ] && continue
60+ (( ${# pkgs[@]} )) || continue
6161
6262 case " $orig " in
6363 pacstall)
@@ -103,10 +103,10 @@ function base_install() {
103103 name=" ${categories[$i]} "
104104 orig=" ${orig_keys[$i]} "
105105
106- # materialize the dynamically-named array into pkgs[]
107- eval ' pkgs=( "${ ' " $ name" ' [@]}" ) '
106+ # pull the list items from YAML into pkgs[] (no eval, no mutation)
107+ mapfile -t pkgs < <( collect_yaml_lists " $name " " $CONFIG_YAML " )
108108
109- [ ${# pkgs[@]} -eq 0 ] && continue
109+ (( ${# pkgs[@]} )) || continue
110110
111111 case " $orig " in
112112 final-ubuntu)
@@ -116,7 +116,7 @@ function base_install() {
116116 _do pac_install " ${pkgs[@]} "
117117 ;;
118118 final-phone)
119- _do pkg_install " ${pkg [@]} "
119+ _do pkg_install " ${pkgs [@]} "
120120 ;;
121121 final-extras)
122122 local x
0 commit comments