diff --git a/post_install_v2.sh b/post_install_v2.sh index 1f4829a..204721a 100644 --- a/post_install_v2.sh +++ b/post_install_v2.sh @@ -42,17 +42,17 @@ fi # Funktion für Menü run_menu() { - local MENU="" + local OPTIONS=() local i=1 for key in "${ORDER[@]}"; do - MENU+="$i \"$key\" " + OPTIONS+=("$i" "$key") ((i++)) done - MENU+="0 \"Beenden\"" + OPTIONS+=("0" "Beenden") CHOICE=$(whiptail --title "POST-INSTALL TOOLBOX" \ --menu "Wähle ein Script zum Ausführen:" 20 70 12 \ - $MENU 3>&1 1>&2 2>&3) + "${OPTIONS[@]}" 3>&1 1>&2 2>&3) echo "$CHOICE" }