Update hw_grafics_menu.sh

This commit is contained in:
MacRimi 2025-01-31 22:02:33 +01:00 committed by GitHub
parent 9caf240d52
commit 12a8510f6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,7 +11,7 @@
# ==========================================================
# Configuration
# Configuration ============================================
REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main"
UTILS_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/utils.sh"
BASE_DIR="/usr/local/share/proxmenux"
@ -19,7 +19,6 @@ CACHE_FILE="$BASE_DIR/cache.json"
VENV_PATH="/opt/googletrans-env"
LANGUAGE=$(jq -r '.language // "en"' "$BASE_DIR/config.json" 2>/dev/null)
if ! source <(curl -sSf "$UTILS_URL"); then
echo "$(translate 'Error: Could not load utils.sh from') $UTILS_URL"
exit 1
@ -37,13 +36,13 @@ load_language() {
LANGUAGE=$(jq -r '.language' "$CONFIG_FILE")
fi
}
# ==========================================================
while true; do
OPTION=$(whiptail --title "$(translate "GPUs and Coral-TPU Menu")" --menu "$(translate "Select an option:")" 15 60 8 \
"1" "$(translate "Añadir aceleración gráfica HW iGPU a un LXC")" \
"2" "$(translate "Añadir Coral TPU a un LXC")" \
"3" "$(translate "Instalar/Actualizar Coral TPU en el Host")" \
"1" "$(translate "Add HW iGPU acceleration to an LXC")" \
"2" "$(translate "Add Coral TPU to an LXC")" \
"3" "$(translate "Install/Update Coral TPU on the Host")" \
"4" "$(translate "Return to Main Menu")" 3>&1 1>&2 2>&3)
case $OPTION in
@ -64,7 +63,7 @@ load_language() {
fi
;;
3)
echo -e "\033[33m[INFO] $(translate "Running script:") $(translate "Coral TPU LXC")...\033[0m"
echo -e "\033[33m[INFO] $(translate "Running script:") $(translate "Install/Update Coral")...\033[0m"
bash <(curl -s "$REPO_URL/scripts/install_coral_pve.sh")
if [ $? -ne 0 ]; then
msg_info "$(translate "Operation cancelled.")"
@ -72,7 +71,7 @@ load_language() {
fi
;;
3) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;;
4) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;;
*) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;;
esac
done