fix: contenido visible en ingles + cuadro del menu alineado

- 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
This commit is contained in:
stornic56
2026-09-29 14:40:03 -05:00
parent 89adaae7af
commit d3bae288f4
7 changed files with 71 additions and 70 deletions
+1 -1
View File
@@ -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_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_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"; } print_error() { echo -e "\033[1;31m [ERROR]\033[0m $1"; _log_plain " [ERROR] $1"; }
+23 -22
View File
@@ -1,70 +1,71 @@
#!/bin/bash #!/bin/bash
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# doctor: verificacion post-instalacion (sin root requerido). # doctor: post-installation verification (no root required).
# Sourced por main.sh (subcomando doctor) y por el menu. # Sourced by main.sh (doctor subcommand) and by the menu.
# Salida con print_* de common.sh; exit code = numero de checks con fallo. # Output with print_* from common.sh; exit code = number of failed checks.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
run_doctor_checks() { run_doctor_checks() {
print_step "Doctor: verificando la instalacion de OpenVINO..." print_step "Doctor: verifying OpenVINO installation..."
local fails=0 local fails=0
# 1. Symlink estable # 1. Stable symlink
if [ -L /opt/intel/openvino_2026 ]; then if [ -L /opt/intel/openvino_2026 ]; then
print_substep "Symlink OK: /opt/intel/openvino_2026 -> $(readlink /opt/intel/openvino_2026)" print_substep "Symlink OK: /opt/intel/openvino_2026 -> $(readlink /opt/intel/openvino_2026)"
else 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)) fails=$((fails+1))
fi fi
# 2. Version instalada # 2. Installed version
if [ -f /opt/intel/openvino_2026/runtime/version.txt ]; then 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 else
print_error "No se encontro runtime/version.txt" print_error "runtime/version.txt not found"
fails=$((fails+1)) fails=$((fails+1))
fi 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 if command -v clinfo >/dev/null 2>&1; then
CLINFO_OUT=$(clinfo 2>/dev/null || true) # clinfo exits !=0 when no devices CLINFO_OUT=$(clinfo 2>/dev/null || true) # clinfo exits !=0 when no devices
if [[ "${CLINFO_OUT^^}" == *"DEVICE NAME"* ]]; then if [[ "${CLINFO_OUT^^}" == *"DEVICE NAME"* ]]; then
print_substep "OpenCL OK (dispositivo detectado)" print_substep "OpenCL OK (device detected)"
else 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)) fails=$((fails+1))
fi fi
else else
print_warning "clinfo no esta instalado" print_warning "clinfo is not installed"
fails=$((fails+1)) fails=$((fails+1))
fi fi
# 4. VAAPI (vainfo) # 4. VAAPI (vainfo) — same capture-first pattern (consistency + latent SIGPIPE)
if command -v vainfo >/dev/null 2>&1; then if command -v vainfo >/dev/null 2>&1; then
VAINFO_OUT=$(vainfo 2>/dev/null || true) VAINFO_OUT=$(vainfo 2>/dev/null || true)
if [[ "${VAINFO_OUT^^}" == *"DRIVER VERSION"* ]]; then if [[ "${VAINFO_OUT^^}" == *"DRIVER VERSION"* ]]; then
print_substep "VAAPI OK (driver cargado)" print_substep "VAAPI OK (driver loaded)"
else 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)) fails=$((fails+1))
fi fi
else else
print_warning "vainfo no esta instalado" print_warning "vainfo is not installed"
fails=$((fails+1)) fails=$((fails+1))
fi 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 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 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)) fails=$((fails+1))
fi fi
if [ "$fails" -eq 0 ]; then if [ "$fails" -eq 0 ]; then
print_substep "Doctor: TODO OK" print_substep "Doctor: ALL OK"
else else
print_warning "Doctor: $fails check(s) con avisos o fallos" print_warning "Doctor: $fails check(s) with warnings or failures"
fi fi
return "$fails" return "$fails"
} }
+9 -9
View File
@@ -1,13 +1,13 @@
#!/bin/bash #!/bin/bash
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Menu minimalista pure-bash (cero dependencias externas: ANSI + read -sn1). # Minimalist pure-bash menu (zero external dependencies: ANSI + read -sn1).
# Navegacion: flechas up/down + Enter, teclas numericas como atajo, q/ESC salir. # Navigation: up/down arrows + Enter, number keys as a shortcut, q/ESC exit.
# Devuelve: 0=salir, 1=instalacion completa, 2=solo NEO, 3=solo OpenVINO, # Returns: 0=exit, 1=full installation, 2=NEO only, 3=OpenVINO only,
# 4=doctor, 5=desinstalar # 4=doctor, 5=uninstall
# Requiere: common.sh ya sourceado (print_*), no necesita root para navegar. # 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() { show_menu() {
local sel=0 local sel=0
@@ -22,7 +22,7 @@ show_menu() {
echo "" echo ""
i=0 i=0
for opt in "${MENU_OPTS[@]}"; do for opt in "${MENU_OPTS[@]}"; do
pad=$(( 36 - ${#opt} )) pad=$(( 38 - ${#opt} ))
if [ "$i" -eq "$sel" ]; then if [ "$i" -eq "$sel" ]; then
printf '│ \033[1;34m▸ %s. %s\033[0m%*s│\n' "$((i+1))" "$opt" "$pad" "" printf '│ \033[1;34m▸ %s. %s\033[0m%*s│\n' "$((i+1))" "$opt" "$pad" ""
else else
@@ -32,9 +32,9 @@ show_menu() {
done done
echo "└──────────────────────────────────────────────┘" echo "└──────────────────────────────────────────────┘"
echo "" echo ""
echo " Flechas + Enter · numero + Enter · q/ESC salir" echo " Arrows + Enter · number + Enter · q/ESC exit"
if ! read -rsn1 key; then if ! read -rsn1 key; then
print_error "Sin entrada disponible." print_error "No input available."
return 0 return 0
fi fi
if [ "$key" = $'\x1b' ]; then if [ "$key" = $'\x1b' ]; then
+19 -19
View File
@@ -1,22 +1,22 @@
#!/bin/bash #!/bin/bash
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Bloque NEO compartido: variables de version, hashes SHA256, descarga con # Shared NEO block: version variables, SHA256 hashes, download with
# verificacion e instalacion via apt. Sourced por los modulos setup_*.sh. # verification and install via apt. Sourced by the setup_*.sh modules.
# #
# El proximo update de versiones cambia SOLO las 4 variables de aqui # The next version update changes ONLY the 4 variables here
# (+ los valores de NEO_HASHES si cambian los hashes). # (+ the NEO_HASHES values if the hashes change).
# Requiere: common.sh ya sourceado (usa print_*), CWD = TEMP_DIR al llamar # Requires: common.sh already sourced (uses print_*), CWD = TEMP_DIR when
# install_neo_packages. # calling install_neo_packages.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# --- Versiones (pinned; sin auto-deteccion) --- # --- Versions (pinned; no auto-detection) ---
IGC_TAG="v2.41.5" # tag de release en intel/intel-graphics-compiler IGC_TAG="v2.41.5" # release tag in intel/intel-graphics-compiler
IGC_BUILD="22716" # build del paquete IGC: 2.41.5+22716 IGC_BUILD="22716" # IGC package build: 2.41.5+22716
IGC_VERSION="${IGC_TAG#v}" # derivado: 2.41.5 IGC_VERSION="${IGC_TAG#v}" # derived: 2.41.5
NEO_VERSION="26.35.39758.10" # release en intel/compute-runtime NEO_VERSION="26.35.39758.10" # release in intel/compute-runtime
GMM_VERSION="22.10.0" # libigdgmm12 (estable entre releases) 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=( declare -A NEO_HASHES=(
["intel-igc-core-2"]="0a6e64a663ae65a0fa02d6912ae3b6b37cf85b90c21cc423fd9fef70aaf4f628" ["intel-igc-core-2"]="0a6e64a663ae65a0fa02d6912ae3b6b37cf85b90c21cc423fd9fef70aaf4f628"
["intel-igc-opencl-2"]="779e1b9e88098eb25711e9a8f67c2752665bad22f134aa40ed5649f6e1b87058" ["intel-igc-opencl-2"]="779e1b9e88098eb25711e9a8f67c2752665bad22f134aa40ed5649f6e1b87058"
@@ -26,7 +26,7 @@ declare -A NEO_HASHES=(
["libze-intel-gpu1"]="c19a641b953d55aebbf1d51bec364a84bf629f985e02fbbe6dc70224c0e88470" ["libze-intel-gpu1"]="c19a641b953d55aebbf1d51bec364a84bf629f985e02fbbe6dc70224c0e88470"
) )
# --- Nombre de archivo del paquete segun su familia --- # --- Package filename by family ---
neo_pkg_filename() { neo_pkg_filename() {
case "$1" in case "$1" in
intel-igc-core-2|intel-igc-opencl-2) intel-igc-core-2|intel-igc-opencl-2)
@@ -38,7 +38,7 @@ neo_pkg_filename() {
esac esac
} }
# --- URL de descarga segun su familia --- # --- Download URL by family ---
neo_pkg_url() { neo_pkg_url() {
case "$1" in case "$1" in
intel-igc-core-2|intel-igc-opencl-2) intel-igc-core-2|intel-igc-opencl-2)
@@ -48,7 +48,7 @@ neo_pkg_url() {
esac esac
} }
# --- Descarga con verificacion SHA256 --- # --- Download with SHA256 verification ---
download_and_verify() { download_and_verify() {
local url="$1" local url="$1"
local filename="$2" local filename="$2"
@@ -57,12 +57,12 @@ download_and_verify() {
local actual local actual
actual=$(sha256sum "$filename" | awk '{print $1}') actual=$(sha256sum "$filename" | awk '{print $1}')
if [ "$actual" != "$expected" ]; then if [ "$actual" != "$expected" ]; then
print_error "SHA256 mismatch para $filename" print_error "SHA256 mismatch for $filename"
exit 1 exit 1
fi fi
} }
# --- Descarga + verificacion + instalacion de los 6 paquetes de produccion --- # --- Download + verify + install of the 6 production packages ---
install_neo_packages() { install_neo_packages() {
local pkg f local pkg f
for pkg in intel-igc-core-2 intel-igc-opencl-2 intel-ocloc libigdgmm12 libze-intel-gpu1 intel-opencl-icd; do 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]}" download_and_verify "$(neo_pkg_url "$pkg")" "$f" "${NEO_HASHES[$pkg]}"
done done
print_substep "Instalando paquetes deb..." print_substep "Installing deb packages..."
apt-get install -y ./*.deb apt-get install -y ./*.deb
} }
+16 -16
View File
@@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# uninstall: desinstala OpenVINO Runtime (y opcionalmente los drivers NEO). # uninstall: removes OpenVINO Runtime (and optionally the NEO drivers).
# Sourced por main.sh (subcomando uninstall). Requiere root para operar. # Sourced by main.sh (uninstall subcommand). Requires root to operate.
# Argumentos: --purge-drivers (dpkg -r de los 6 paquetes NEO), --yes (sin prompt). # Arguments: --purge-drivers (dpkg -r of the 6 NEO packages), --yes (no prompt).
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
run_uninstall() { run_uninstall() {
@@ -18,40 +18,40 @@ run_uninstall() {
done done
if [ "$EUID" -ne 0 ]; then 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 exit 1
fi 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 if [ "$ASSUME_YES" != true ]; then
read -r -p "Esto eliminara /opt/intel/openvino_2026* (todas las instalaciones 2026). ¿Continuar? [y/n]: " response || { read -r -p "This will remove /opt/intel/openvino_2026* (all 2026 installations). Continue? [y/n]: " response || {
print_error "Sin entrada disponible. Desinstalacion cancelada." print_error "No input available. Uninstall cancelled."
exit 1 exit 1
} }
case "$response" in case "$response" in
[yY]*) ;; [yY]*) ;;
*) *)
print_error "Desinstalacion cancelada por el usuario." print_error "Uninstall cancelled by the user."
exit 0 exit 0
;; ;;
esac esac
fi fi
# Runtime: symlink O directorio real + cualquier instalacion 2026 # Runtime: symlink OR real directory + any 2026 installation
# (rm -rf no sigue symlinks — cubre ambos casos) # (rm -rf does not follow symlinks — covers both cases)
rm -rf /opt/intel/openvino_2026 rm -rf /opt/intel/openvino_2026
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 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 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
fi fi
print_substep "Desinstalacion completada." print_substep "Uninstall completed."
} }
+2 -2
View File
@@ -61,7 +61,7 @@ if [ "$ASSUME_YES" != true ] && [ "$FORCE_NO_GPU" != true ]; then
show_menu || sel=$? show_menu || sel=$?
case "$sel" in case "$sel" in
0) 0)
print_step "Hasta pronto." print_step "See you soon."
exit 0 exit 0
;; ;;
1) : ;; 1) : ;;
@@ -186,7 +186,7 @@ else
fi fi
if [ "$MODE" = "neo" ]; then if [ "$MODE" = "neo" ]; then
print_step "Instalacion NEO finalizada." print_step "NEO installation finished."
exit 0 exit 0
fi fi
+1 -1
View File
@@ -39,7 +39,7 @@ cd /
rm -rf "$TEMP_DIR" rm -rf "$TEMP_DIR"
# ---- 4. add user ---- # ---- 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 if [ -n "${SUDO_USER:-}" ]; then
usermod -a -G render,video "$SUDO_USER" usermod -a -G render,video "$SUDO_USER"
else else