Update main_menu.sh

This commit is contained in:
MacRimi 2025-01-29 22:17:21 +01:00 committed by GitHub
parent 07e1e6e039
commit 43473ecf84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,15 @@ if ! source <(curl -sSf "$UTILS_URL"); then
exit 1 exit 1
fi fi
# Initialize cache
initialize_cache() {
if [ ! -f "$CACHE_FILE" ]; then
echo "{}" > "$CACHE_FILE"
return
fi
}
show_menu() {
while true; do while true; do
OPTION=$(whiptail --title "$(translate "Main Menu")" --menu "$(translate "Select an option:")" 15 60 5 \ OPTION=$(whiptail --title "$(translate "Main Menu")" --menu "$(translate "Select an option:")" 15 60 5 \
"1" "$(translate "GPUs and Coral-TPU")" \ "1" "$(translate "GPUs and Coral-TPU")" \
@ -47,3 +55,9 @@ fi
esac esac
done done
}
# Main flow
initialize_cache
show_menu