[IMPROVED] Estandarizar uso de DEVELOPER_DIR en cversadm_token.sh y base.lib
- Añadir variable global DEVELOPER_DIR=${HOME}/.developer a base.lib - Eliminar definición redundante en cversadm_token.sh y usar la variable global - Actualizar todas las referencias a la variable en las funciones del script - Centralizar definición de la ruta para uso consistente en todo el proyecto 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
ac6f91b048
commit
e4a9864b6c
2 changed files with 7 additions and 6 deletions
|
@ -22,7 +22,7 @@
|
|||
# junto con este programa. Si no la recibió, consulte <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Configuración inicial
|
||||
DEVELOPERS_DIR="$HOME/.developer"
|
||||
# Usar DEVELOPER_DIR de base.lib
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# Leer DEVSPATH desde el archivo de configuración o usar "devs" por defecto
|
||||
|
@ -69,10 +69,10 @@ check_sops_installed() {
|
|||
|
||||
# Función para asegurar que el directorio .developer existe
|
||||
ensure_developers_dir() {
|
||||
if [ ! -d "$DEVELOPERS_DIR" ]; then
|
||||
mkdir -p "$DEVELOPERS_DIR"
|
||||
chmod 700 "$DEVELOPERS_DIR"
|
||||
echo "${cvmsg_008} $DEVELOPERS_DIR"
|
||||
if [ ! -d "$DEVELOPER_DIR" ]; then
|
||||
mkdir -p "$DEVELOPER_DIR"
|
||||
chmod 700 "$DEVELOPER_DIR"
|
||||
echo "${cvmsg_008} $DEVELOPER_DIR"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ request_token() {
|
|||
save_token() {
|
||||
local platform=$1
|
||||
local token=$2
|
||||
local filename="${DEVELOPERS_DIR}/${platform}.sops.yaml"
|
||||
local filename="${DEVELOPER_DIR}/${platform}.sops.yaml"
|
||||
local token_file="/tmp/vcs_token_$$"
|
||||
|
||||
# Convertir token a base64 para mayor seguridad
|
||||
|
|
|
@ -30,6 +30,7 @@ BIN_MESG=${BIN_MESG:=${BIN_BASE}/msg}
|
|||
BIN_LIBS=${BIN_LIBS:=${BIN_BASE}/lib}
|
||||
DEVS_NAME=${CONFPATH}/project.head
|
||||
GIT_IGNORE=.gitignore
|
||||
DEVELOPER_DIR=${HOME}/.developer
|
||||
DATENOW="$(date +"%Y-%m-%d %H:%M:%S")"
|
||||
DATEBAK="$(date +"%Y%m%d%H%M%S")"
|
||||
|
||||
|
|
Loading…
Reference in a new issue