mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2025-12-21 18:20:13 +01:00
Setting install to 0.51.1
On branch hl-051 Your branch is up to date with 'origin/hl-051'. Changes to be committed: modified: install.sh modified: refresh-hypr-tags.sh modified: update-hyprland.sh
This commit is contained in:
parent
98c7c31635
commit
95708df841
@ -368,13 +368,12 @@ echo "${INFO} Installing ${SKY_BLUE}necessary fonts...${RESET}" | tee -a "$LOG"
|
||||
sleep 1
|
||||
execute_script "fonts.sh"
|
||||
|
||||
# Auto-refresh tags before building the Hyprland stack (can be disabled with NO_FETCH_LATEST=1)
|
||||
if [ -z "${NO_FETCH_LATEST:-}" ] || [ "${NO_FETCH_LATEST:-0}" = "0" ]; then
|
||||
if [ -f ./refresh-hypr-tags.sh ]; then
|
||||
# Optional: refresh tags before building the Hyprland stack
|
||||
# Set FETCH_LATEST=1 to opt-in (default is no-refresh to honor pinned tags)
|
||||
if [ "${FETCH_LATEST:-0}" = "1" ] && [ -f ./refresh-hypr-tags.sh ]; then
|
||||
chmod +x ./refresh-hypr-tags.sh || true
|
||||
./refresh-hypr-tags.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "${INFO} Installing ${SKY_BLUE}KooL Hyprland packages...${RESET}" | tee -a "$LOG"
|
||||
sleep 1
|
||||
|
||||
@ -56,11 +56,12 @@ while IFS='=' read -r k v; do
|
||||
cur[$k]="$v"
|
||||
edone < "$TAGS_FILE"
|
||||
|
||||
# Fetch latest
|
||||
# Fetch latest, but only update keys set to 'auto' or 'latest' unless forced
|
||||
FORCE=${FORCE:-0}
|
||||
for key in "${!repos[@]}"; do
|
||||
repo="${repos[$key]}"
|
||||
url="https://api.github.com/repos/$repo/releases/latest"
|
||||
echo "[INFO] Fetching latest tag for $repo" | tee -a "$SUMMARY_LOG"
|
||||
echo "[INFO] Checking latest tag for $repo" | tee -a "$SUMMARY_LOG"
|
||||
body=$(curl -fsSL "$url" || true)
|
||||
[[ -z "$body" ]] && { echo "[WARN] Empty response for $repo" | tee -a "$SUMMARY_LOG"; continue; }
|
||||
if command -v jq >/dev/null 2>&1; then
|
||||
@ -68,8 +69,17 @@ for key in "${!repos[@]}"; do
|
||||
else
|
||||
tag=$(printf '%s' "$body" | grep -m1 '"tag_name"' | sed -E 's/.*"tag_name"\s*:\s*"([^"]+)".*/\1/')
|
||||
fi
|
||||
[[ -n "$tag" ]] && cur[$key]="$tag" || echo "[WARN] Could not parse tag for $repo" | tee -a "$SUMMARY_LOG"
|
||||
|
||||
if [[ -z "$tag" ]]; then
|
||||
echo "[WARN] Could not parse tag for $repo" | tee -a "$SUMMARY_LOG"
|
||||
continue
|
||||
fi
|
||||
existing="${cur[$key]:-}"
|
||||
if [[ $FORCE -eq 1 ]] || [[ "$existing" =~ ^(auto|latest)$ ]] || [[ -z "$existing" ]]; then
|
||||
cur[$key]="$tag"
|
||||
echo "[OK] $key := $tag" | tee -a "$SUMMARY_LOG"
|
||||
else
|
||||
echo "[SKIP] $key pinned ($existing), not overriding" | tee -a "$SUMMARY_LOG"
|
||||
fi
|
||||
done
|
||||
|
||||
# Write back
|
||||
|
||||
@ -137,6 +137,13 @@ fetch_latest_tags() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Read existing to respect pinned values (only update keys set to 'auto' or 'latest')
|
||||
declare -A existing
|
||||
while IFS='=' read -r k v; do
|
||||
[[ -z "$k" || "$k" =~ ^# ]] && continue
|
||||
existing[$k]="$v"
|
||||
done < "$TAGS_FILE"
|
||||
|
||||
declare -A repos=(
|
||||
[HYPRLAND_TAG]="hyprwm/Hyprland"
|
||||
[AQUAMARINE_TAG]="hyprwm/aquamarine"
|
||||
@ -180,7 +187,10 @@ fetch_latest_tags() {
|
||||
done < "$TAGS_FILE"
|
||||
|
||||
for k in "${!tags[@]}"; do
|
||||
# Only override if pinned value is 'auto' or 'latest'
|
||||
if [[ "${existing[$k]:-}" =~ ^(auto|latest)$ ]] || [[ -z "${existing[$k]:-}" ]]; then
|
||||
map[$k]="${tags[$k]}"
|
||||
fi
|
||||
done
|
||||
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user