From 43473ecf84bcb4f39ec84fb24e599aee9fac9e5d Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Wed, 29 Jan 2025 22:17:21 +0100 Subject: [PATCH] Update main_menu.sh --- scripts/menus/main_menu.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/menus/main_menu.sh b/scripts/menus/main_menu.sh index 0d62221..2a257d2 100644 --- a/scripts/menus/main_menu.sh +++ b/scripts/menus/main_menu.sh @@ -26,7 +26,15 @@ if ! source <(curl -sSf "$UTILS_URL"); then exit 1 fi +# Initialize cache +initialize_cache() { + if [ ! -f "$CACHE_FILE" ]; then + echo "{}" > "$CACHE_FILE" + return + fi +} +show_menu() { while true; do OPTION=$(whiptail --title "$(translate "Main Menu")" --menu "$(translate "Select an option:")" 15 60 5 \ "1" "$(translate "GPUs and Coral-TPU")" \ @@ -47,3 +55,9 @@ fi esac done +} + +# Main flow +initialize_cache +show_menu +