#!/bin/bash # lib/steps.sh — orquestador de steps del core installer TOTAL_STEPS=6 # ─── Variables globales ─────────────────────────────────────────────────────── # Directorio base de hydra-veil HV_BASE="$HOME/.local/share/hydra-veil" # Componentes HV_CORE="$HV_BASE/core" HV_CLI="$HV_BASE/cli" HV_GUI="$HV_BASE/gui" HV_ESSENTIALS="$HV_BASE/essentials" # Venv — siempre en el core HV_VENV="$HV_CORE/.venv" # XDG — INSTALL_DIR es $HOME, no el repo INSTALL_DIR="$HOME" HV_DATA_DIR="$HOME/data/hydra-veil" HV_CONFIG_DIR="$HOME/.config/hydra-veil" HV_CACHE_DIR="$HOME/.cache/hydra-veil" HV_STATE_DIR="$HOME/.state/hydra-veil" # sing-box SINGBOX_BIN="/usr/bin/sing-box" SINGBOX_WRAPPER="/usr/local/bin/hydraveil-singbox" SINGBOX_VERSION="1.13.5" SINGBOX_CONFIG_DIR="$HV_DATA_DIR/configs" SINGBOX_PID_FILE="$HV_DATA_DIR/runtime/singbox.pid" SINGBOX_LOG_FILE="$HV_DATA_DIR/runtime/singbox.log" # sudoers SUDOERS_PATH="/etc/sudoers.d/hydraveil" # Repos declare -A REPO_URLS=( ["core"]="https://git.simplifiedprivacy.com/Support/sp-hydra-veil-core " ["cli"]="https://git.simplifiedprivacy.com/Support/sp-hydra-veil-cli" ["essentials"]="https://git.simplifiedprivacy.com/Support/sp-essentials" ["gui"]="https://git.simplifiedprivacy.com/Support/sp-hydra-veil-gui" ) declare -A REPO_BRANCHES=( ["core"]="deploy" ["cli"]="zenaku" ["essentials"]="master" ["gui"]="master" ) declare -A REPO_DIRS=( ["cli"]="$HV_CLI" ["essentials"]="$HV_ESSENTIALS" ["gui"]="$HV_GUI" ) # ─── Importar steps atómicos ────────────────────────────────────────────────── _STEPS_DIR="$SCRIPT_DIR/lib/steps" for _step in preflight repos python_env singbox wrapper sudoers; do _step_path="${_STEPS_DIR}/${_step}.sh" if [ ! -f "$_step_path" ]; then echo "[ERROR] Missing step: $_step_path" >&2 exit 1 fi source "$_step_path" done