diff --git a/Debian-Hyprland-Install-Upgrade.es.md b/Debian-Hyprland-Install-Upgrade.es.md index 339966b..50577c2 100644 --- a/Debian-Hyprland-Install-Upgrade.es.md +++ b/Debian-Hyprland-Install-Upgrade.es.md @@ -44,7 +44,7 @@ chmod +x ./update-hyprland.sh Flags clave: - --fetch-latest: obtiene las últimas etiquetas desde GitHub -- --force-update: sobrescribe valores fijados en hypr-tags.env (equivalente a FORCE=1). Implica --fetch-latest. +- --force-update: sobrescribe valores fijados en hypr-tags.env (equivalente a FORCE=1) - --dry-run / --install: solo compilar o compilar+instalar - --only / --skip: limitar qué módulos se ejecutan diff --git a/Debian-Hyprland-Install-Upgrade.md b/Debian-Hyprland-Install-Upgrade.md index 0c10853..5cf20c9 100644 --- a/Debian-Hyprland-Install-Upgrade.md +++ b/Debian-Hyprland-Install-Upgrade.md @@ -44,7 +44,7 @@ chmod +x ./update-hyprland.sh Key flags: - --fetch-latest: pull latest release tags from GitHub -- --force-update: override pinned values in hypr-tags.env (equivalent to FORCE=1). Implies --fetch-latest. +- --force-update: override pinned values in hypr-tags.env (equivalent to FORCE=1) - --dry-run / --install: compile-only or compile+install - --only / --skip: limit which modules run diff --git a/refresh-hypr-tags.sh b/refresh-hypr-tags.sh index a95f71b..9019cb7 100755 --- a/refresh-hypr-tags.sh +++ b/refresh-hypr-tags.sh @@ -56,9 +56,6 @@ declare -A cur while IFS='=' read -r k v; do [[ -z "${k:-}" || "$k" =~ ^# ]] && continue cur[$k]="$v" - # keep original snapshot for diff - orig_${k}="$v" - export orig_${k} 2>/dev/null || true done < "$TAGS_FILE" # Fetch latest, but only update keys set to 'auto' or 'latest' unless forced diff --git a/update-hyprland.sh b/update-hyprland.sh index e6a32e5..51301a5 100755 --- a/update-hyprland.sh +++ b/update-hyprland.sh @@ -222,25 +222,13 @@ fetch_latest_tags() { # Build a list of changes (old -> new) according to override rules changes=() for k in "${!tags[@]}"; do - old="${existing[$k]:-}" - new="${tags[$k]}" if [[ $FORCE_UPDATE -eq 1 ]]; then - if [[ -n "$new" && "$old" != "$new" ]]; then - changes+=("$k: $old -> $new") - map[$k]="$new" - else - # still ensure map has at least old value - [[ -n "${map[$k]:-}" ]] || map[$k]="$old" - fi + # Force override regardless of current value (matches FORCE=1 behavior in refresh-hypr-tags.sh) + map[$k]="${tags[$k]}" else - if [[ "$old" =~ ^(auto|latest)$ ]] || [[ -z "$old" ]]; then - if [[ -n "$new" && "$old" != "$new" ]]; then - changes+=("$k: $old -> $new") - map[$k]="$new" - fi - else - # pinned: keep old - map[$k]="$old" + # Only override if pinned value is 'auto' or 'latest' (or unset) + if [[ "${existing[$k]:-}" =~ ^(auto|latest)$ ]] || [[ -z "${existing[$k]:-}" ]]; then + map[$k]="${tags[$k]}" fi fi done @@ -566,8 +554,6 @@ while [[ $# -gt 0 ]]; do ;; --force-update) FORCE_UPDATE=1 - # --force-update implies --fetch-latest so tags actually refresh - FETCH_LATEST=1 shift ;; --restore)