- Crear plantilla bash.head para encabezados de scripts - Crear plantilla bash.variables para variables comunes en todos los scripts - Implementar script standardize_scripts.sh para aplicar estas plantillas 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
29 lines
No EOL
822 B
Text
29 lines
No EOL
822 B
Text
# Configuración inicial
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
# Leer DEVSPATH desde el archivo de configuración o usar "devs" por defecto
|
|
if [ -f "$SCRIPT_DIR/config/devspath.dat" ]; then
|
|
DEVSPATH=$(cat "$SCRIPT_DIR/config/devspath.dat")
|
|
else
|
|
DEVSPATH="devs"
|
|
fi
|
|
|
|
BIN_HOME="$HOME/$DEVSPATH"
|
|
BIN_BASE="bin"
|
|
BIN_LIBS="lib"
|
|
BIN_MESG="msg"
|
|
BIN_CFGS="config"
|
|
VERSION=$(cat "$BIN_HOME/$BIN_BASE/$BIN_CFGS/version")
|
|
|
|
# CHECK SHELL LANGUAGE
|
|
BIN_LANG=${LANG:0:2}
|
|
|
|
# Importar bibliotecas necesarias
|
|
source "${BIN_HOME}/${BIN_BASE}/${BIN_LIBS}/base.lib"
|
|
source "${BIN_HOME}/${BIN_BASE}/${BIN_LIBS}/console.lib"
|
|
|
|
# Cargar mensajes en el idioma del sistema o español por defecto
|
|
load_messages "${BIN_HOME}/${BIN_BASE}" "${BIN_MESG}" "${BIN_LANG}" "head"
|
|
|
|
# Variables globales
|
|
title="${head_000} ${head_002}" |