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
11
install.sh
11
install.sh
@ -368,12 +368,11 @@ echo "${INFO} Installing ${SKY_BLUE}necessary fonts...${RESET}" | tee -a "$LOG"
|
|||||||
sleep 1
|
sleep 1
|
||||||
execute_script "fonts.sh"
|
execute_script "fonts.sh"
|
||||||
|
|
||||||
# Auto-refresh tags before building the Hyprland stack (can be disabled with NO_FETCH_LATEST=1)
|
# Optional: refresh tags before building the Hyprland stack
|
||||||
if [ -z "${NO_FETCH_LATEST:-}" ] || [ "${NO_FETCH_LATEST:-0}" = "0" ]; then
|
# Set FETCH_LATEST=1 to opt-in (default is no-refresh to honor pinned tags)
|
||||||
if [ -f ./refresh-hypr-tags.sh ]; then
|
if [ "${FETCH_LATEST:-0}" = "1" ] && [ -f ./refresh-hypr-tags.sh ]; then
|
||||||
chmod +x ./refresh-hypr-tags.sh || true
|
chmod +x ./refresh-hypr-tags.sh || true
|
||||||
./refresh-hypr-tags.sh
|
./refresh-hypr-tags.sh
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "${INFO} Installing ${SKY_BLUE}KooL Hyprland packages...${RESET}" | tee -a "$LOG"
|
echo "${INFO} Installing ${SKY_BLUE}KooL Hyprland packages...${RESET}" | tee -a "$LOG"
|
||||||
|
|||||||
@ -56,11 +56,12 @@ while IFS='=' read -r k v; do
|
|||||||
cur[$k]="$v"
|
cur[$k]="$v"
|
||||||
edone < "$TAGS_FILE"
|
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
|
for key in "${!repos[@]}"; do
|
||||||
repo="${repos[$key]}"
|
repo="${repos[$key]}"
|
||||||
url="https://api.github.com/repos/$repo/releases/latest"
|
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)
|
body=$(curl -fsSL "$url" || true)
|
||||||
[[ -z "$body" ]] && { echo "[WARN] Empty response for $repo" | tee -a "$SUMMARY_LOG"; continue; }
|
[[ -z "$body" ]] && { echo "[WARN] Empty response for $repo" | tee -a "$SUMMARY_LOG"; continue; }
|
||||||
if command -v jq >/dev/null 2>&1; then
|
if command -v jq >/dev/null 2>&1; then
|
||||||
@ -68,8 +69,17 @@ for key in "${!repos[@]}"; do
|
|||||||
else
|
else
|
||||||
tag=$(printf '%s' "$body" | grep -m1 '"tag_name"' | sed -E 's/.*"tag_name"\s*:\s*"([^"]+)".*/\1/')
|
tag=$(printf '%s' "$body" | grep -m1 '"tag_name"' | sed -E 's/.*"tag_name"\s*:\s*"([^"]+)".*/\1/')
|
||||||
fi
|
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
|
done
|
||||||
|
|
||||||
# Write back
|
# Write back
|
||||||
|
|||||||
@ -137,6 +137,13 @@ fetch_latest_tags() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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=(
|
declare -A repos=(
|
||||||
[HYPRLAND_TAG]="hyprwm/Hyprland"
|
[HYPRLAND_TAG]="hyprwm/Hyprland"
|
||||||
[AQUAMARINE_TAG]="hyprwm/aquamarine"
|
[AQUAMARINE_TAG]="hyprwm/aquamarine"
|
||||||
@ -180,7 +187,10 @@ fetch_latest_tags() {
|
|||||||
done < "$TAGS_FILE"
|
done < "$TAGS_FILE"
|
||||||
|
|
||||||
for k in "${!tags[@]}"; do
|
for k in "${!tags[@]}"; do
|
||||||
map[$k]="${tags[$k]}"
|
# Only override if pinned value is 'auto' or 'latest'
|
||||||
|
if [[ "${existing[$k]:-}" =~ ^(auto|latest)$ ]] || [[ -z "${existing[$k]:-}" ]]; then
|
||||||
|
map[$k]="${tags[$k]}"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user