From d3bae288f4a2a60a1e417998a9a0a84da5ae8006 Mon Sep 17 00:00:00 2001 From: stornic56 <71296607+stornic56@users.noreply.github.com> Date: Tue, 29 Sep 2026 14:40:03 -0500 Subject: [PATCH] fix: contenido visible en ingles + cuadro del menu alineado MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Traduccion completa del contenido visible a ingles: doctor.sh (14 cadenas), menu.sh (MENU_OPTS, footer, error), uninstall.sh (9 cadenas), neo_apt.sh (2 cadenas), main.sh (2 cadenas), setup_ubuntu.sh (1 cadena), label [AVISO]->[WARNING] en common.sh - Comentarios en español de los archivos nuevos a ingles (consistencia con el codebase) - Cuadro del menu alineado: pad 36->38 (medicion exacta: bordes y header 48, opciones 46 — delta 2; todas las lineas del cuadro miden ahora 48) - Verificado: medicion 10/10 lineas a 48, 0 espanol visible, bash -n en los 7 archivos, doctor en ingles TODO OK exit=0 --- core/common.sh | 2 +- core/doctor.sh | 45 +++++++++++++++++++++-------------------- core/menu.sh | 18 ++++++++--------- core/neo_apt.sh | 38 +++++++++++++++++----------------- core/uninstall.sh | 32 ++++++++++++++--------------- main.sh | 4 ++-- modules/setup_ubuntu.sh | 2 +- 7 files changed, 71 insertions(+), 70 deletions(-) diff --git a/core/common.sh b/core/common.sh index 829752f..b75212b 100644 --- a/core/common.sh +++ b/core/common.sh @@ -12,5 +12,5 @@ _log_plain() { printf '%s\n' "$1" >> "$LOG_FILE" 2>/dev/null || true; } print_step() { echo -e "\n\033[1;34m>>>\033[0m \033[1m$1\033[0m"; _log_plain ""; _log_plain ">>> $1"; } print_substep() { echo -e "\033[1;32m =>\033[0m $1"; _log_plain " => $1"; } -print_warning() { echo -e "\033[1;33m [AVISO]\033[0m $1"; _log_plain " [AVISO] $1"; } +print_warning() { echo -e "\033[1;33m [WARNING]\033[0m $1"; _log_plain " [WARNING] $1"; } print_error() { echo -e "\033[1;31m [ERROR]\033[0m $1"; _log_plain " [ERROR] $1"; } diff --git a/core/doctor.sh b/core/doctor.sh index 84b49a7..eafe901 100644 --- a/core/doctor.sh +++ b/core/doctor.sh @@ -1,70 +1,71 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# doctor: verificacion post-instalacion (sin root requerido). -# Sourced por main.sh (subcomando doctor) y por el menu. -# Salida con print_* de common.sh; exit code = numero de checks con fallo. +# doctor: post-installation verification (no root required). +# Sourced by main.sh (doctor subcommand) and by the menu. +# Output with print_* from common.sh; exit code = number of failed checks. # ------------------------------------------------------------------------------ run_doctor_checks() { - print_step "Doctor: verificando la instalacion de OpenVINO..." + print_step "Doctor: verifying OpenVINO installation..." local fails=0 - # 1. Symlink estable + # 1. Stable symlink if [ -L /opt/intel/openvino_2026 ]; then print_substep "Symlink OK: /opt/intel/openvino_2026 -> $(readlink /opt/intel/openvino_2026)" else - print_error "Falta el symlink /opt/intel/openvino_2026 (¿la instalacion no se realizo?)" + print_error "Missing symlink /opt/intel/openvino_2026 (was the installation performed?)" fails=$((fails+1)) fi - # 2. Version instalada + # 2. Installed version if [ -f /opt/intel/openvino_2026/runtime/version.txt ]; then - print_substep "Version instalada: $(cat /opt/intel/openvino_2026/runtime/version.txt)" + print_substep "Installed version: $(cat /opt/intel/openvino_2026/runtime/version.txt)" else - print_error "No se encontro runtime/version.txt" + print_error "runtime/version.txt not found" fails=$((fails+1)) fi - # 3. OpenCL (clinfo) + # 3. OpenCL (clinfo) — capture first (clinfo output is large; grep -q would + # SIGPIPE-kill the pipe and report a false negative under pipefail) if command -v clinfo >/dev/null 2>&1; then CLINFO_OUT=$(clinfo 2>/dev/null || true) # clinfo exits !=0 when no devices if [[ "${CLINFO_OUT^^}" == *"DEVICE NAME"* ]]; then - print_substep "OpenCL OK (dispositivo detectado)" + print_substep "OpenCL OK (device detected)" else - print_warning "clinfo no detecta dispositivo (¿falta el driver NEO o los grupos render/video?)" + print_warning "clinfo does not detect a device (missing NEO driver or render/video groups?)" fails=$((fails+1)) fi else - print_warning "clinfo no esta instalado" + print_warning "clinfo is not installed" fails=$((fails+1)) fi - # 4. VAAPI (vainfo) + # 4. VAAPI (vainfo) — same capture-first pattern (consistency + latent SIGPIPE) if command -v vainfo >/dev/null 2>&1; then VAINFO_OUT=$(vainfo 2>/dev/null || true) if [[ "${VAINFO_OUT^^}" == *"DRIVER VERSION"* ]]; then - print_substep "VAAPI OK (driver cargado)" + print_substep "VAAPI OK (driver loaded)" else - print_warning "vainfo no carga driver (¿falta intel-media-va-driver?)" + print_warning "vainfo does not load a driver (missing intel-media-va-driver?)" fails=$((fails+1)) fi else - print_warning "vainfo no esta instalado" + print_warning "vainfo is not installed" fails=$((fails+1)) fi - # 5. Grupos render/video + # 5. render/video groups if id -Gn 2>/dev/null | grep -qw render && id -Gn 2>/dev/null | grep -qw video; then - print_substep "Grupos OK: el usuario esta en render y video" + print_substep "Groups OK: user is in render and video" else - print_warning "El usuario NO esta en los grupos render/video (reinicia la sesion tras instalar)" + print_warning "User is NOT in the render/video groups (restart your session after installing)" fails=$((fails+1)) fi if [ "$fails" -eq 0 ]; then - print_substep "Doctor: TODO OK" + print_substep "Doctor: ALL OK" else - print_warning "Doctor: $fails check(s) con avisos o fallos" + print_warning "Doctor: $fails check(s) with warnings or failures" fi return "$fails" } diff --git a/core/menu.sh b/core/menu.sh index 6f74e71..c73a2ea 100644 --- a/core/menu.sh +++ b/core/menu.sh @@ -1,13 +1,13 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Menu minimalista pure-bash (cero dependencias externas: ANSI + read -sn1). -# Navegacion: flechas up/down + Enter, teclas numericas como atajo, q/ESC salir. -# Devuelve: 0=salir, 1=instalacion completa, 2=solo NEO, 3=solo OpenVINO, -# 4=doctor, 5=desinstalar -# Requiere: common.sh ya sourceado (print_*), no necesita root para navegar. +# Minimalist pure-bash menu (zero external dependencies: ANSI + read -sn1). +# Navigation: up/down arrows + Enter, number keys as a shortcut, q/ESC exit. +# Returns: 0=exit, 1=full installation, 2=NEO only, 3=OpenVINO only, +# 4=doctor, 5=uninstall +# Requires: common.sh already sourced (print_*), no root needed to navigate. # ------------------------------------------------------------------------------ -MENU_OPTS=("Instalacion completa" "Solo drivers NEO" "Solo OpenVINO Runtime" "Verificar instalacion (doctor)" "Desinstalar" "Salir") +MENU_OPTS=("Full installation" "NEO drivers only" "OpenVINO Runtime only" "Verify installation (doctor)" "Uninstall" "Exit") show_menu() { local sel=0 @@ -22,7 +22,7 @@ show_menu() { echo "" i=0 for opt in "${MENU_OPTS[@]}"; do - pad=$(( 36 - ${#opt} )) + pad=$(( 38 - ${#opt} )) if [ "$i" -eq "$sel" ]; then printf '│ \033[1;34m▸ %s. %s\033[0m%*s│\n' "$((i+1))" "$opt" "$pad" "" else @@ -32,9 +32,9 @@ show_menu() { done echo "└──────────────────────────────────────────────┘" echo "" - echo " Flechas + Enter · numero + Enter · q/ESC salir" + echo " Arrows + Enter · number + Enter · q/ESC exit" if ! read -rsn1 key; then - print_error "Sin entrada disponible." + print_error "No input available." return 0 fi if [ "$key" = $'\x1b' ]; then diff --git a/core/neo_apt.sh b/core/neo_apt.sh index 5ca82db..27b15ce 100644 --- a/core/neo_apt.sh +++ b/core/neo_apt.sh @@ -1,22 +1,22 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Bloque NEO compartido: variables de version, hashes SHA256, descarga con -# verificacion e instalacion via apt. Sourced por los modulos setup_*.sh. +# Shared NEO block: version variables, SHA256 hashes, download with +# verification and install via apt. Sourced by the setup_*.sh modules. # -# El proximo update de versiones cambia SOLO las 4 variables de aqui -# (+ los valores de NEO_HASHES si cambian los hashes). -# Requiere: common.sh ya sourceado (usa print_*), CWD = TEMP_DIR al llamar -# install_neo_packages. +# The next version update changes ONLY the 4 variables here +# (+ the NEO_HASHES values if the hashes change). +# Requires: common.sh already sourced (uses print_*), CWD = TEMP_DIR when +# calling install_neo_packages. # ------------------------------------------------------------------------------ -# --- Versiones (pinned; sin auto-deteccion) --- -IGC_TAG="v2.41.5" # tag de release en intel/intel-graphics-compiler -IGC_BUILD="22716" # build del paquete IGC: 2.41.5+22716 -IGC_VERSION="${IGC_TAG#v}" # derivado: 2.41.5 -NEO_VERSION="26.35.39758.10" # release en intel/compute-runtime -GMM_VERSION="22.10.0" # libigdgmm12 (estable entre releases) +# --- Versions (pinned; no auto-detection) --- +IGC_TAG="v2.41.5" # release tag in intel/intel-graphics-compiler +IGC_BUILD="22716" # IGC package build: 2.41.5+22716 +IGC_VERSION="${IGC_TAG#v}" # derived: 2.41.5 +NEO_VERSION="26.35.39758.10" # release in intel/compute-runtime +GMM_VERSION="22.10.0" # libigdgmm12 (stable across releases) -# --- Hashes SHA256 por nombre de paquete (los valores cambian con cada version) --- +# --- SHA256 hashes by package name (values change with each version) --- declare -A NEO_HASHES=( ["intel-igc-core-2"]="0a6e64a663ae65a0fa02d6912ae3b6b37cf85b90c21cc423fd9fef70aaf4f628" ["intel-igc-opencl-2"]="779e1b9e88098eb25711e9a8f67c2752665bad22f134aa40ed5649f6e1b87058" @@ -26,7 +26,7 @@ declare -A NEO_HASHES=( ["libze-intel-gpu1"]="c19a641b953d55aebbf1d51bec364a84bf629f985e02fbbe6dc70224c0e88470" ) -# --- Nombre de archivo del paquete segun su familia --- +# --- Package filename by family --- neo_pkg_filename() { case "$1" in intel-igc-core-2|intel-igc-opencl-2) @@ -38,7 +38,7 @@ neo_pkg_filename() { esac } -# --- URL de descarga segun su familia --- +# --- Download URL by family --- neo_pkg_url() { case "$1" in intel-igc-core-2|intel-igc-opencl-2) @@ -48,7 +48,7 @@ neo_pkg_url() { esac } -# --- Descarga con verificacion SHA256 --- +# --- Download with SHA256 verification --- download_and_verify() { local url="$1" local filename="$2" @@ -57,12 +57,12 @@ download_and_verify() { local actual actual=$(sha256sum "$filename" | awk '{print $1}') if [ "$actual" != "$expected" ]; then - print_error "SHA256 mismatch para $filename" + print_error "SHA256 mismatch for $filename" exit 1 fi } -# --- Descarga + verificacion + instalacion de los 6 paquetes de produccion --- +# --- Download + verify + install of the 6 production packages --- install_neo_packages() { local pkg f for pkg in intel-igc-core-2 intel-igc-opencl-2 intel-ocloc libigdgmm12 libze-intel-gpu1 intel-opencl-icd; do @@ -70,6 +70,6 @@ install_neo_packages() { download_and_verify "$(neo_pkg_url "$pkg")" "$f" "${NEO_HASHES[$pkg]}" done - print_substep "Instalando paquetes deb..." + print_substep "Installing deb packages..." apt-get install -y ./*.deb } diff --git a/core/uninstall.sh b/core/uninstall.sh index 097b45d..dc1692b 100644 --- a/core/uninstall.sh +++ b/core/uninstall.sh @@ -1,8 +1,8 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# uninstall: desinstala OpenVINO Runtime (y opcionalmente los drivers NEO). -# Sourced por main.sh (subcomando uninstall). Requiere root para operar. -# Argumentos: --purge-drivers (dpkg -r de los 6 paquetes NEO), --yes (sin prompt). +# uninstall: removes OpenVINO Runtime (and optionally the NEO drivers). +# Sourced by main.sh (uninstall subcommand). Requires root to operate. +# Arguments: --purge-drivers (dpkg -r of the 6 NEO packages), --yes (no prompt). # ------------------------------------------------------------------------------ run_uninstall() { @@ -18,40 +18,40 @@ run_uninstall() { done if [ "$EUID" -ne 0 ]; then - print_error "uninstall requiere root. Usa: sudo bash main.sh uninstall [--purge-drivers] [--yes]" + print_error "uninstall requires root. Use: sudo bash main.sh uninstall [--purge-drivers] [--yes]" exit 1 fi - print_step "Uninstall: desinstalando OpenVINO Runtime..." + print_step "Uninstall: removing OpenVINO Runtime..." - # Confirmacion obligatoria (con --yes se omite) + # Mandatory confirmation (skipped with --yes) if [ "$ASSUME_YES" != true ]; then - read -r -p "Esto eliminara /opt/intel/openvino_2026* (todas las instalaciones 2026). ¿Continuar? [y/n]: " response || { - print_error "Sin entrada disponible. Desinstalacion cancelada." + read -r -p "This will remove /opt/intel/openvino_2026* (all 2026 installations). Continue? [y/n]: " response || { + print_error "No input available. Uninstall cancelled." exit 1 } case "$response" in [yY]*) ;; *) - print_error "Desinstalacion cancelada por el usuario." + print_error "Uninstall cancelled by the user." exit 0 ;; esac fi - # Runtime: symlink O directorio real + cualquier instalacion 2026 - # (rm -rf no sigue symlinks — cubre ambos casos) + # Runtime: symlink OR real directory + any 2026 installation + # (rm -rf does not follow symlinks — covers both cases) rm -rf /opt/intel/openvino_2026 rm -rf /opt/intel/openvino_2026.* - print_substep "OpenVINO Runtime eliminado (/opt/intel/openvino_2026*)" + print_substep "OpenVINO Runtime removed (/opt/intel/openvino_2026*)" - # Drivers NEO (opcional, best-effort con aviso) + # NEO drivers (optional, best-effort with a warning) if [ "$PURGE_DRIVERS" = true ]; then - print_substep "Purgando drivers NEO (dpkg -r)..." + print_substep "Purging NEO drivers (dpkg -r)..." if ! dpkg -r intel-opencl-icd intel-ocloc libigdgmm12 libze-intel-gpu1 intel-igc-core-2 intel-igc-opencl-2 2>/dev/null; then - print_warning "Algunos paquetes NEO no estaban instalados (en Fedora: dnf remove intel-compute-runtime)" + print_warning "Some NEO packages were not installed (on Fedora: dnf remove intel-compute-runtime)" fi fi - print_substep "Desinstalacion completada." + print_substep "Uninstall completed." } diff --git a/main.sh b/main.sh index 2449407..52432ec 100755 --- a/main.sh +++ b/main.sh @@ -61,7 +61,7 @@ if [ "$ASSUME_YES" != true ] && [ "$FORCE_NO_GPU" != true ]; then show_menu || sel=$? case "$sel" in 0) - print_step "Hasta pronto." + print_step "See you soon." exit 0 ;; 1) : ;; @@ -186,7 +186,7 @@ else fi if [ "$MODE" = "neo" ]; then - print_step "Instalacion NEO finalizada." + print_step "NEO installation finished." exit 0 fi diff --git a/modules/setup_ubuntu.sh b/modules/setup_ubuntu.sh index 38f2088..3905b55 100644 --- a/modules/setup_ubuntu.sh +++ b/modules/setup_ubuntu.sh @@ -39,7 +39,7 @@ cd / rm -rf "$TEMP_DIR" # ---- 4. add user ---- -print_substep "Añadiendo usuario a grupos render y video..." +print_substep "Adding user to render and video groups..." if [ -n "${SUDO_USER:-}" ]; then usermod -a -G render,video "$SUDO_USER" else