Update hw_grafics_menu.sh

This commit is contained in:
MacRimi 2025-01-31 20:48:31 +01:00 committed by GitHub
parent 9f2c8f26a8
commit 9caf240d52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,12 +20,24 @@ VENV_PATH="/opt/googletrans-env"
LANGUAGE=$(jq -r '.language // "en"' "$BASE_DIR/config.json" 2>/dev/null) LANGUAGE=$(jq -r '.language // "en"' "$BASE_DIR/config.json" 2>/dev/null)
# Try to load utils.sh from GitHub
if ! source <(curl -sSf "$UTILS_URL"); then if ! source <(curl -sSf "$UTILS_URL"); then
echo "$(translate 'Error: Could not load utils.sh from') $UTILS_URL" echo "$(translate 'Error: Could not load utils.sh from') $UTILS_URL"
exit 1 exit 1
fi fi
initialize_cache() {
if [ ! -f "$CACHE_FILE" ]; then
echo "{}" > "$CACHE_FILE"
return
fi
}
load_language() {
if [ -f "$CONFIG_FILE" ]; then
LANGUAGE=$(jq -r '.language' "$CONFIG_FILE")
fi
}
while true; do while true; do
OPTION=$(whiptail --title "$(translate "GPUs and Coral-TPU Menu")" --menu "$(translate "Select an option:")" 15 60 8 \ OPTION=$(whiptail --title "$(translate "GPUs and Coral-TPU Menu")" --menu "$(translate "Select an option:")" 15 60 8 \