[FIXED] Corregir rutas en scripts bootstrap.sh y update.sh

Corrección de rutas para que los scripts utilicen SCRIPT_DIR en lugar de BIN_HOME
para resolver problemas al cargar bibliotecas y configuraciones.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Mauro Rosero P. 2025-03-30 15:46:10 -05:00
parent b979ef59fd
commit 31834d4bed
Signed by: mrosero
GPG key ID: 83BD2A5F674B7E26
2 changed files with 12 additions and 12 deletions

View file

@ -40,16 +40,16 @@ BIN_BASE="bin"
BIN_LIBS="lib" BIN_LIBS="lib"
BIN_MESG="msg" BIN_MESG="msg"
BIN_CFGS="config" BIN_CFGS="config"
VERSION=$(cat "$BIN_HOME/$BIN_BASE/$BIN_CFGS/version") VERSION=$(cat "$SCRIPT_DIR/$BIN_CFGS/version")
# CHECK SHELL LANGUAGE # CHECK SHELL LANGUAGE
BIN_LANG=${LANG:0:2} BIN_LANG=${LANG:0:2}
# Importar bibliotecas necesarias # Importar bibliotecas necesarias
source "${BIN_HOME}/${BIN_BASE}/${BIN_LIBS}/base.lib" source "${SCRIPT_DIR}/${BIN_LIBS}/base.lib"
# Cargar mensajes en el idioma del sistema o español por defecto # Cargar mensajes en el idioma del sistema o español por defecto
load_messages "${BIN_HOME}/${BIN_BASE}" "${BIN_MESG}" "${BIN_LANG}" "head" load_messages "${SCRIPT_DIR}" "${BIN_MESG}" "${BIN_LANG}" "head"
# Variables globales # Variables globales
title="${head_000} ${head_002}" title="${head_000} ${head_002}"
@ -215,10 +215,10 @@ install() {
} }
# Load messages # Load messages
load_bootstrap_msg $BIN_HOME $BIN_MESG $BIN_LANG load_bootstrap_msg $SCRIPT_DIR $BIN_MESG $BIN_LANG
# Display Headers # Display Headers
display_devstools_header "- $bomsg_000" display_devstools_header "- $bomsg_000"
# Run install with sudo (sin parámetros específicos) # Run install with sudo (sin parámetros específicos)
sudo bash -c "$(declare -f load_bootstrap_msg; declare -f install); install $BIN_HOME $BIN_LIBS $BIN_MESG $BIN_LANG" sudo bash -c "$(declare -f load_bootstrap_msg; declare -f install); install $SCRIPT_DIR $BIN_LIBS $BIN_MESG $BIN_LANG"

View file

@ -40,10 +40,10 @@ BIN_BASE="bin"
BIN_LIBS="lib" BIN_LIBS="lib"
BIN_MESG="msg" BIN_MESG="msg"
BIN_CFGS="config" BIN_CFGS="config"
VERSION=$(cat "$BIN_HOME/$BIN_BASE/$BIN_CFGS/version") VERSION=$(cat "$SCRIPT_DIR/$BIN_CFGS/version")
# LOAD BASE BASH LIBRARY # LOAD BASE BASH LIBRARY
source $BIN_HOME/$BIN_BASE/$BIN_LIBS/base.lib source $SCRIPT_DIR/$BIN_LIBS/base.lib
#baselib_test #baselib_test
load_bootstrap_msg() { load_bootstrap_msg() {
@ -61,7 +61,7 @@ load_bootstrap_msg() {
} }
# Load messages # Load messages
load_bootstrap_msg $BIN_HOME $BIN_MESG $BIN_LANG load_bootstrap_msg $SCRIPT_DIR $BIN_MESG $BIN_LANG
# Display Headers # Display Headers
display_devstools_header "- $bomsg_001" display_devstools_header "- $bomsg_001"
@ -76,7 +76,7 @@ else
fi fi
# Load bootstrap library for update functions # Load bootstrap library for update functions
source $BIN_HOME/$BIN_BASE/$BIN_LIBS/bootstrap.lib source $SCRIPT_DIR/$BIN_LIBS/bootstrap.lib
# Update sistema operativo y repositorios primero (no requiere privilegios de root) # Update sistema operativo y repositorios primero (no requiere privilegios de root)
echo -e "\n${head_info}: Actualizando repositorios locales primero..." echo -e "\n${head_info}: Actualizando repositorios locales primero..."
@ -190,7 +190,7 @@ if [ $PYTHON_INSTALLED -eq 0 ] || [ $PIP_INSTALLED -eq 0 ]; then
# Exportar todas las funciones necesarias para que estén disponibles en el subproceso sudo # Exportar todas las funciones necesarias para que estén disponibles en el subproceso sudo
# Esto incluye command_installed y otras funciones de base.lib que se necesitan # Esto incluye command_installed y otras funciones de base.lib que se necesitan
sudo bash -c "$(declare -f command_installed; declare -f update_python_and_pip); update_python_and_pip $BIN_HOME $BIN_LIBS $BIN_MESG $BIN_LANG" sudo bash -c "$(declare -f command_installed; declare -f update_python_and_pip); update_python_and_pip $SCRIPT_DIR $BIN_LIBS $BIN_MESG $BIN_LANG"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo -e "\n${head_error}: No se pudo actualizar Python y pip. Verifique sus privilegios." echo -e "\n${head_error}: No se pudo actualizar Python y pip. Verifique sus privilegios."
fi fi
@ -207,7 +207,7 @@ update_additional_tools() {
local UPDATE_LANG=$4 local UPDATE_LANG=$4
# Cargar biblioteca bootstrap para acceder a las funciones de instalación # Cargar biblioteca bootstrap para acceder a las funciones de instalación
source "$BIN_PATH/$BIN_BASE/$LIBRARY/bootstrap.lib" source "$BIN_PATH/$LIBRARY/bootstrap.lib"
# Actualizar oathtool si está instalado # Actualizar oathtool si está instalado
command_installed oathtool command_installed oathtool
@ -251,7 +251,7 @@ update_additional_tools() {
# Actualizar herramientas adicionales con sudo si están instaladas # Actualizar herramientas adicionales con sudo si están instaladas
echo -e "\n${head_info}: Verificando herramientas adicionales..." echo -e "\n${head_info}: Verificando herramientas adicionales..."
sudo bash -c "$(declare -f command_installed; declare -f update_additional_tools); update_additional_tools $BIN_HOME/$BIN_BASE $BIN_LIBS $BIN_MESG $BIN_LANG" sudo bash -c "$(declare -f command_installed; declare -f update_additional_tools); update_additional_tools $SCRIPT_DIR $BIN_LIBS $BIN_MESG $BIN_LANG"
echo -e "\n${head_info}: Proceso de actualización completado." echo -e "\n${head_info}: Proceso de actualización completado."