Modify vars in header

This commit is contained in:
2024-08-02 22:07:25 -04:00
parent f11d21ba33
commit f6a32ff73c

View File

@@ -419,7 +419,11 @@ interactive_header() {
if [[ -z ${MODULES[*]} && -z ${EXCLUDE_MODULES[*]} ]]; then if [[ -z ${MODULES[*]} && -z ${EXCLUDE_MODULES[*]} ]]; then
echo "Enter a comma-separated list of modules to run" echo "Enter a comma-separated list of modules to run"
((YES)) || read -r -p "Hit Enter for all (default) or '0' for none: " response ((YES)) || read -r -p "Hit Enter for all (default) or '0' for none: " response
if [[ -n $response && $response -ne 0 ]]; then if [[ -z $response ]]; then
MODULES=("${ALL_MODULES[@]}")
elif [[ $response -eq 0 ]]; then
EXCLUDE_MODULES=("${ALL_MODULES[@]}")
else
IFS=',' read -ra arr <<< "$response" IFS=',' read -ra arr <<< "$response"
for i in "${arr[@]}"; do for i in "${arr[@]}"; do
MODULES+=("${ALL_MODULES[$((i-1))]}") MODULES+=("${ALL_MODULES[$((i-1))]}")