Compare commits

..

5 Commits

Author SHA1 Message Date
Donald Williams
131fc3b370
Merge branch 'main' into development 2026-01-02 21:43:16 -05:00
Don Williams
8d2d0587ba Fixed update-hyprland refresh-hypr-tags --force-override
It now assumes --fetch-latest
Small formatting fixes
Now shows version to upgrade too and pause to allow review

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   CHANGELOGS.md
	modified:   Debian-Hyprland-Install-Upgrade.es.md
    modified:   Debian-Hyprland-Install-Upgrade.md
	modified:   dry-run-build.sh
	modified:   refresh-hypr-tags.sh
	modified:   update-hyprland.sh
2026-01-02 20:51:28 -05:00
Donald Williams
5026d63d6c
Development to main (#231)
* Testing build from debian packages

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	new file:   BUILD_METHOD_OPTIONS.md
	new file:   CHANGES_SUMMARY.md
	new file:   GIT_STATUS.md
	new file:   INSTALL_METHOD_GUIDE.md
	new file:   QUICK_START.txt
	modified:   install.sh

* Fix package installation: skip plugins and debug symbols by default, improve dependency handling

* Add comprehensive troubleshooting guide for package installation issues

* Fix package installation path handling: use full paths instead of cd to preserve working directory

* Removed files related to debian pacakge building

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	deleted:    BUILD_METHOD_OPTIONS.md
	deleted:    GIT_STATUS.md
	deleted:    INSTALL_METHOD_GUIDE.md
	deleted:    PACKAGE_INSTALL_TROUBLESHOOTING.md
	deleted:    QUICK_START.txt

* Ported ubuntu quickshell install script to debian

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	new file:   install-scripts/quickshell.sh

* Forgot to add quickshell as install option

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   install.sh

* Added missing depdendencies to debian quickshell

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   install-scripts/quickshell.sh

* Fixing QML import pathing

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   install-scripts/quickshell.sh

* Adding shim for missing QML properies

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   install-scripts/quickshell.sh

* Added check for debian trixie in quickshell install

 Trixe doesn't support overview seems like the QT libs are too old

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   install-scripts/quickshell.sh

* Fixed typo in script

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   refresh-hypr-tags.sh

* libmuparser-dev is now needed

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   install-scripts/00-dependencies.sh
	modified:   install-scripts/hyprland.sh

* Adding hyprwire depdency

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   hypr-tags.env
	new file:   install-scripts/hyprwire.sh
	modified:   install.sh
	modified:   refresh-hypr-tags.sh
	modified:   update-hyprland.sh

* Updating hyprwire build order

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   install-scripts/hyprland.sh

* Fixing script permissions

* fixing hyprwire build error

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   hyprwire.sh

* Still fixing hyprwire build errors

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   hyprwire.sh

* Fixing SED error.  (I Hate sed)

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   hyprwire.sh

* Still getting append errors trying another fix

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   hyprwire.sh

* Updated tags for 0.53.0

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   ../hypr-tags.env
	modified:   hyprland.sh

* Fixing build error on hyprland

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   hyprland.sh

* Still getting build errors with hyprland

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   install-scripts/hyprland.sh

* More build errors to fix

 On branch development
 Your branch is ahead of 'origin/development' by 1 commit.
   (use "git push" to publish your local commits)

 Changes to be committed:
	modified:   install-scripts/hyprland.sh

* Fixind SED error

* Hyprland tag set to 52.2

* Scripts has hardcoded versions vs. pulling hypr-env

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   install-scripts/aquamarine.sh
	modified:   install-scripts/hyprcursor.sh
	modified:   install-scripts/hyprgraphics.sh
	modified:   install-scripts/hyprland-guiutils.sh
	modified:   install-scripts/hyprland-protocols.sh
	modified:   install-scripts/hyprland-qt-support.sh
	modified:   install-scripts/hyprland.sh
	modified:   install-scripts/hyprlang.sh
	modified:   install-scripts/hyprtoolkit.sh
	modified:   install-scripts/hyprutils.sh
	modified:   install-scripts/hyprwayland-scanner.sh
	modified:   install-scripts/hyprwire.sh
	modified:   install-scripts/wayland-protocols-src.sh

* Fixing update-hyprland to support tags

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   install-scripts/hyprutils.sh
	modified:   update-hyprland.sh

* Fixing update-hyprland (again) to use env-tags

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   update-hyprland.sh

* Fixing update-hyprland

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   update-hyprland.sh

* Trying to get trixie to build

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   install-scripts/hyprland.sh

* Updated README re: NVIDIA drivers & HL 0.52.2+ on Trixie

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   README.md

* UPD: Before ubunmtu was out-of-date, now can run HL dots

previsously ubuntu was older HL. Now it's up to date and can
also run current dotfiles. Removed old statement saying ubuntu could not
run current dotfiles.

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   README.md

* Pinned version to 52.2 for debian stable support

 On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   CHANGELOGS.md
	deleted:    CHANGES_SUMMARY.md
	modified:   Debian-Hyprland-Install-Upgrade.es.md
	modified:   Debian-Hyprland-Install-Upgrade.md
	modified:   hypr-tags.env
	new file:   hypr-tags.env-v.053
	modified:   update-hyprland.sh
2026-01-02 19:38:34 -05:00
Don Williams
7afba04e3a Pinned version to 52.2 for debian stable support
On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   CHANGELOGS.md
	deleted:    CHANGES_SUMMARY.md
	modified:   Debian-Hyprland-Install-Upgrade.es.md
	modified:   Debian-Hyprland-Install-Upgrade.md
	modified:   hypr-tags.env
	new file:   hypr-tags.env-v.053
	modified:   update-hyprland.sh
2026-01-02 19:32:19 -05:00
Donald Williams
7613ab90e7
Merge pull request #229 from JaKooLit/development
Development to main,  Updated HL to 0.52.2
2025-12-11 12:15:51 -05:00
9 changed files with 182 additions and 266 deletions

View File

@ -1,5 +1,17 @@
## CHANGELOGS ## CHANGELOGS
## 02 January 2026
- Updated:
- `update-hyprland.sh` pinned to v0.52.2
- Currently only Debian testing and SID branches build v0.53+
- Added `--force-update` to refresh the pacakge versions if pinned
- This is only for debian testing+ versions
- `update-hyprland.sh` added `-/--help`
- documentation for updating hyprland
- Added: version update to `refresh-tags` and `update-hyprland` script
- Fixed: `--force-update` implies `--fetch-latest`
## 10 December 2025 ## 10 December 2025
- Updated: - Updated:

View File

@ -1,247 +0,0 @@
# Install Script Updates - Summary of Changes
## Files Modified
- `install.sh` - Main installation script
## Files Created
- `INSTALL_METHOD_GUIDE.md` - Comprehensive documentation
- `QUICK_START.txt` - Quick reference guide
- `CHANGES_SUMMARY.md` - This file
## Key Additions to install.sh
### 1. Package Source Variable (Line 4-6)
```bash
# Source location for pre-built Debian packages (can be local or network share)
# Set this variable to the path containing .deb files, or leave empty to build from source
DEB_PACKAGES_SOURCE="/mnt/nas/Projects/Jak/debian-pkg/build/debs"
```
**Purpose:** Configurable location for pre-built .deb packages
**Default:** `/mnt/nas/Projects/Jak/debian-pkg/build/debs`
**Can be modified to:** Any local path or network share with .deb files
### 2. clean_existing_hyprland() Function (Lines 123-160)
**Purpose:** Remove conflicting installations before installing from packages
**Operations:**
- Removes all .deb packages using `apt-get remove`
- Deletes source-built binaries from /usr/bin and /usr/local/bin
- Removes development files from /usr/local/include and /usr/local/lib
- Updates library cache with `ldconfig`
**Packages Cleaned:**
- hyprland, hyprutils, hyprgraphics, hyprcursor, hyprtoolkit
- hyprland-guiutils, hyprwire, aquamarine, hypridle, hyprlock
- hyprpolkitagent, hyprpicker, xdg-desktop-portal-hyprland, hyprland-plugins
**Binaries Cleaned:**
- /usr/local/bin/Hyprland, /usr/local/bin/hyprland
- /usr/bin/Hyprland, /usr/bin/hyprland
**Development Files Cleaned:**
- /usr/local/include/hyprland*
- /usr/local/lib/libhypr*
- /usr/local/lib/libaquamarine*
- /usr/local/lib/libypr*
### 3. install_from_packages() Function (Lines 162-197)
**Purpose:** Install Hyprland from pre-built .deb packages
**Steps:**
1. Validate DEB_PACKAGES_SOURCE exists
2. Count available .deb files
3. Call clean_existing_hyprland() for cleanup
4. Update package cache with `apt-get update`
5. Install all .deb files with `dpkg -i`
6. Fix dependencies with `apt-get install -f -y`
### 4. Build Method Selection (Lines 206-231)
**Purpose:** Allow user to choose between source build and package installation
**Logic:**
- Detects if packages are available at DEB_PACKAGES_SOURCE
- If yes, prompts user with whiptail dialog
- YES: Install from pre-built packages
- NO: Build from source
- If no packages found, defaults to source build
**User Prompts:**
- "Build Method" dialog shows package location and options
- "Proceed with Installation?" dialog shows selected method and instructions
### 5. Installation Flow Modification (Lines 429-490)
**Purpose:** Execute selected build method with proper conditional logic
**Changes:**
- Added if/else condition checking `build_method` variable
- If "packages": Calls install_from_packages()
- If "source": Executes original build scripts
**Original Behavior:** Always builds from source
**New Behavior:** Offers choice, defaults to source if packages unavailable
## Benefits
### For Users
- **Faster Installation:** 5-10 minutes vs 1-2 hours with pre-built packages
- **Simpler Setup:** No build tools required for package installation
- **Flexibility:** Can choose between speed (packages) or latest code (source)
- **Safety:** Automatic cleanup prevents conflicts between methods
- **Testing Ready:** Can quickly test pre-built packages on shared network
### For Testing/Development
- **Network Share Support:** Can test on NAS without compiling
- **Version Control:** Easy to test different package versions
- **Quick Iteration:** Fast install/uninstall cycles for testing
- **Shared Resources:** Multiple users can share pre-built packages
## Configuration
### Default Setup (Current)
```bash
DEB_PACKAGES_SOURCE="/mnt/nas/Projects/Jak/debian-pkg/build/debs"
```
### To Disable Package Installation (Always Source)
```bash
DEB_PACKAGES_SOURCE=""
```
### To Use Different Package Location
```bash
DEB_PACKAGES_SOURCE="/path/to/your/packages"
```
## Usage Examples
### Quick Install from Packages
```bash
./install.sh
# Select YES when prompted
# ~5-10 minutes
```
### Build from Source
```bash
./install.sh
# Select NO when prompted
# ~1-2 hours
```
### Force Package Location
```bash
DEB_PACKAGES_SOURCE="/custom/path" ./install.sh
```
## Backward Compatibility
✓ **Fully backward compatible**
- If DEB_PACKAGES_SOURCE not found, script defaults to source build
- Original source build scripts still work unchanged
- Existing workflows not disrupted
## Testing Notes
**Test Scenario 1:** Fresh installation from packages
```
Expected: 5-10 minute install
Actual: [To be tested]
```
**Test Scenario 2:** Switch from source to packages
```
Expected: Automatic cleanup, fresh install
Actual: [To be tested]
```
**Test Scenario 3:** Switch from packages to source
```
Expected: Cleanup, source build
Actual: [To be tested]
```
## Files Included
| File | Purpose |
|------|---------|
| install.sh | Modified main script with build method options |
| INSTALL_METHOD_GUIDE.md | Comprehensive documentation |
| QUICK_START.txt | Quick reference for users |
| CHANGES_SUMMARY.md | This file |
## Lines Changed in install.sh
| Section | Lines | Change Type |
|---------|-------|------------|
| Package source config | 4-6 | New variable |
| clean_existing_hyprland() | 123-160 | New function |
| install_from_packages() | 162-197 | New function |
| Build method selection | 206-231 | New conditional |
| Installation flow | 429-490 | Modified logic |
## Documentation Created
1. **INSTALL_METHOD_GUIDE.md** (303 lines)
- Comprehensive user guide
- Installation flows
- Troubleshooting
- Environment variables
- Performance comparison
2. **QUICK_START.txt** (Plain text format)
- Quick reference
- Common questions
- Troubleshooting
- Ready-to-use commands
## Pre-built Package Information
**Location:** `/mnt/nas/Projects/Jak/debian-pkg/build/debs`
**Count:** 59 .deb files
**Version:** Hyprland 0.52.2
**Date Built:** 2025-12-13
### Package Breakdown
- Core packages: 5
- Utilities: 5
- Extensions: 5
- Development files: 7
- Debug symbols: 24
- Binary packages: 28
## Known Limitations
1. **Package Availability**: Requires packages to exist at DEB_PACKAGES_SOURCE
2. **Network Dependency**: Remote packages need accessible network path
3. **Version Pinning**: Pre-built packages are fixed version (no live updates)
4. **Space Requirements**: 59 .deb files require ~1-2GB total
## Future Enhancements
Potential improvements for future versions:
- Package version selection dialog
- Automatic package generation option
- Package download from repository
- Package cache management
- Mirror support for distributed testing
## Support & Maintenance
For issues or questions:
1. Check INSTALL_METHOD_GUIDE.md
2. Review Install-Logs/ directory
3. Verify DEB_PACKAGES_SOURCE accessibility
4. Run `apt-get update` manually if needed
## Version History
| Date | Version | Changes |
|------|---------|---------|
| 2025-12-13 | 1.0 | Initial release with package installation support |
---
**Script Updated:** 2025-12-13
**Compatible with:** Debian Trixie / SiD
**Build System:** dpkg-buildpackage

View File

@ -42,6 +42,12 @@ chmod +x ./update-hyprland.sh
./update-hyprland.sh --help # Ver todas las opciones ./update-hyprland.sh --help # Ver todas las opciones
``` ```
Flags clave:
- --fetch-latest: obtiene las últimas etiquetas desde GitHub
- --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
#### dry-run-build.sh #### dry-run-build.sh
Herramienta de pruebas que compila componentes sin instalarlos: Herramienta de pruebas que compila componentes sin instalarlos:
```bash ```bash
@ -100,6 +106,9 @@ Ahora, este método automáticamente:
```bash ```bash
# Obtiene últimas versiones de GitHub e instala # Obtiene últimas versiones de GitHub e instala
./update-hyprland.sh --fetch-latest --install ./update-hyprland.sh --fetch-latest --install
# Si tu hypr-tags.env tiene valores fijados y deseas sobrescribirlos:
./update-hyprland.sh --fetch-latest --force-update --install
``` ```
### Método 4: Instalación con Preset ### Método 4: Instalación con Preset
@ -116,8 +125,11 @@ Enlace rápido: [Actualización 0.49/0.50.x → 0.51.1](#actualización-049050x-
#### Opción A: Descubrimiento Automático #### Opción A: Descubrimiento Automático
```bash ```bash
# Obtiene las últimas etiquetas e instala # Obtiene las últimas etiquetas e instala (respeta versiones fijadas en hypr-tags.env)
./update-hyprland.sh --fetch-latest --install ./update-hyprland.sh --fetch-latest --install
# Forzar la actualización de todas las etiquetas (mismo efecto que ejecutar refresh con FORCE=1)
./update-hyprland.sh --fetch-latest --force-update --install
``` ```
#### Opción B: Versión Específica #### Opción B: Versión Específica
@ -254,6 +266,14 @@ find Install-Logs/ -name "*.log" -mtime +30 -delete
### Gestión de Versiones ### Gestión de Versiones
#### Forzar la Actualización de Todas las Etiquetas
```bash
# Sobrescribe valores fijados en hypr-tags.env con las últimas versiones
./update-hyprland.sh --fetch-latest --force-update --dry-run
# Instalar si la dry-run es exitosa
./update-hyprland.sh --force-update --install
```
#### Copia de Seguridad y Restauración #### Copia de Seguridad y Restauración
```bash ```bash
# Las etiquetas se respaldan automáticamente cuando cambian # Las etiquetas se respaldan automáticamente cuando cambian

View File

@ -42,6 +42,12 @@ chmod +x ./update-hyprland.sh
./update-hyprland.sh --help # View all options ./update-hyprland.sh --help # View all options
``` ```
Key flags:
- --fetch-latest: pull latest release tags from GitHub
- --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
#### dry-run-build.sh #### dry-run-build.sh
A testing tool that compiles components without installing: A testing tool that compiles components without installing:
```bash ```bash
@ -100,6 +106,9 @@ This method now automatically:
```bash ```bash
# Fetch latest GitHub releases and install # Fetch latest GitHub releases and install
./update-hyprland.sh --fetch-latest --install ./update-hyprland.sh --fetch-latest --install
# If your hypr-tags.env has pinned values and you want to override them:
./update-hyprland.sh --fetch-latest --force-update --install
``` ```
### Method 4: Preset-Based Installation ### Method 4: Preset-Based Installation
@ -116,8 +125,11 @@ Quick link: [Upgrade 0.49/0.50.x → 0.51.1](#upgrade-049050x--0511)
#### Option A: Automatic Discovery #### Option A: Automatic Discovery
```bash ```bash
# Fetch latest tags and install # Fetch latest tags and install (respects pins in hypr-tags.env)
./update-hyprland.sh --fetch-latest --install ./update-hyprland.sh --fetch-latest --install
# Force-override pinned values (same effect as running refresh with FORCE=1)
./update-hyprland.sh --fetch-latest --force-update --install
``` ```
#### Option B: Specific Version #### Option B: Specific Version
@ -254,6 +266,14 @@ find Install-Logs/ -name "*.log" -mtime +30 -delete
### Tag Management ### Tag Management
#### Force Update All Tags
```bash
# Override pinned values in hypr-tags.env to the latest releases
./update-hyprland.sh --fetch-latest --force-update --dry-run
# Install if the dry-run succeeds
./update-hyprland.sh --force-update --install
```
#### Backup and Restore #### Backup and Restore
```bash ```bash
# Tags are automatically backed up on changes # Tags are automatically backed up on changes

View File

@ -134,11 +134,16 @@ done
# Summary # Summary
{ {
echo "\nSummary (dry-run):" printf "\nSummary (dry-run):\n"
for mod in "${MODULES[@]}"; do for mod in "${MODULES[@]}"; do
printf "%-24s %s\n" "$mod" "${RESULTS[$mod]:-SKIPPED}" printf "%-24s %s\n" "$mod" "${RESULTS[$mod]:-SKIPPED}"
done done
echo "\nLogs: individual module logs are under Install-Logs/. This summary: $SUMMARY_LOG" # Show current tag values to make changes visible during dry-runs
if [[ -f "$REPO_ROOT/hypr-tags.env" ]]; then
printf "\nCurrent versions (from %s):\n" "$REPO_ROOT/hypr-tags.env"
grep -E '^[A-Z0-9_]+=' "$REPO_ROOT/hypr-tags.env" | sort
fi
printf "\nLogs: individual module logs are under Install-Logs/. This summary: %s\n" "$SUMMARY_LOG"
} | tee -a "$SUMMARY_LOG" } | tee -a "$SUMMARY_LOG"
# Exit non-zero if any FAIL occurred # Exit non-zero if any FAIL occurred

View File

@ -1,13 +1,15 @@
# Central tag overrides for the Hyprland stack
# You can edit these values or let update-hyprland.sh manage them.
# Each module script reads its TAG from these environment variables if set.
HYPRLAND_TAG=v0.52.2
AQUAMARINE_TAG=v0.10.0 AQUAMARINE_TAG=v0.10.0
HYPRGRAPHICS_TAG=v0.5.0 HYPRUTILS_TAG=v0.10.4
HYPRLAND_GUIUTILS_TAG=v0.2.0 HYPRLANG_TAG=v0.6.7
HYPRGRAPHICS_TAG=v0.4.0
HYPRTOOLKIT_TAG=v0.4.1
HYPRWAYLAND_SCANNER_TAG=v0.4.5
HYPRLAND_PROTOCOLS_TAG=v0.7.0 HYPRLAND_PROTOCOLS_TAG=v0.7.0
HYPRLAND_QT_SUPPORT_TAG=v0.1.0 HYPRLAND_QT_SUPPORT_TAG=v0.1.0
HYPRLAND_QTUTILS_TAG=v0.1.5 HYPRLAND_GUIUTILS_TAG=v0.2.0
HYPRLAND_TAG=v0.53.0
HYPRLANG_TAG=v0.6.7
HYPRTOOLKIT_TAG=v0.4.1
HYPRUTILS_TAG=v0.11.0
HYPRWAYLAND_SCANNER_TAG=v0.4.5
HYPRWIRE_TAG=v0.2.1
WAYLAND_PROTOCOLS_TAG=1.46 WAYLAND_PROTOCOLS_TAG=1.46

13
hypr-tags.env-v.053 Normal file
View File

@ -0,0 +1,13 @@
AQUAMARINE_TAG=v0.10.0
HYPRGRAPHICS_TAG=v0.5.0
HYPRLAND_GUIUTILS_TAG=v0.2.0
HYPRLAND_PROTOCOLS_TAG=v0.7.0
HYPRLAND_QT_SUPPORT_TAG=v0.1.0
HYPRLAND_QTUTILS_TAG=v0.1.5
HYPRLAND_TAG=v0.53.0
HYPRLANG_TAG=v0.6.7
HYPRTOOLKIT_TAG=v0.4.1
HYPRUTILS_TAG=v0.11.0
HYPRWAYLAND_SCANNER_TAG=v0.4.5
HYPRWIRE_TAG=v0.2.1
WAYLAND_PROTOCOLS_TAG=1.46

View File

@ -60,6 +60,7 @@ done < "$TAGS_FILE"
# Fetch latest, but only update keys set to 'auto' or 'latest' unless forced # Fetch latest, but only update keys set to 'auto' or 'latest' unless forced
FORCE=${FORCE:-0} FORCE=${FORCE:-0}
changes=()
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"
@ -78,12 +79,30 @@ for key in "${!repos[@]}"; do
existing="${cur[$key]:-}" existing="${cur[$key]:-}"
if [[ $FORCE -eq 1 ]] || [[ "$existing" =~ ^(auto|latest)$ ]] || [[ -z "$existing" ]]; then if [[ $FORCE -eq 1 ]] || [[ "$existing" =~ ^(auto|latest)$ ]] || [[ -z "$existing" ]]; then
cur[$key]="$tag" cur[$key]="$tag"
if [[ "$existing" != "$tag" ]]; then
changes+=("$key: $existing -> $tag")
fi
echo "[OK] $key := $tag" | tee -a "$SUMMARY_LOG" echo "[OK] $key := $tag" | tee -a "$SUMMARY_LOG"
else else
echo "[SKIP] $key pinned ($existing), not overriding" | tee -a "$SUMMARY_LOG" echo "[SKIP] $key pinned ($existing), not overriding" | tee -a "$SUMMARY_LOG"
fi fi
done done
# Show change summary and prompt before writing (interactive only)
if [[ -t 0 && ${#changes[@]} -gt 0 ]]; then
printf "\nPlanned tag updates (refresh-hypr-tags.sh):\n" | tee -a "$SUMMARY_LOG"
printf "%s\n" "${changes[@]}" | tee -a "$SUMMARY_LOG"
printf "\nProceed with writing updated tags to %s? [Y/n]: " "$TAGS_FILE"
read -r ans || true
ans=${ans:-Y}
case "$ans" in
[nN]|[nN][oO])
echo "[INFO] User aborted tag update; leaving $TAGS_FILE unchanged." | tee -a "$SUMMARY_LOG"
exit 0
;;
esac
fi
# Write back # Write back
{ {
for k in "${!cur[@]}"; do for k in "${!cur[@]}"; do
@ -91,4 +110,4 @@ done
done | sort done | sort
} > "$TAGS_FILE" } > "$TAGS_FILE"
echo "[OK] Refreshed tags written to $TAGS_FILE" | tee -a "$SUMMARY_LOG" echo "[OK] Refreshed tags written to $TAGS_FILE" | tee -a "$SUMMARY_LOG"

View File

@ -17,6 +17,8 @@
# ./update-hyprland.sh --skip aquamarine --install # ./update-hyprland.sh --skip aquamarine --install
# ./update-hyprland.sh --with-deps --dry-run # ./update-hyprland.sh --with-deps --dry-run
# ./update-hyprland.sh --fetch-latest --via-helper # use dry-run-build.sh for a summary-only run # ./update-hyprland.sh --fetch-latest --via-helper # use dry-run-build.sh for a summary-only run
# ./update-hyprland.sh --force-update --install # override pinned versions (equivalent to FORCE=1)
# ./update-hyprland.sh --help # show this help
# #
# Notes: # Notes:
# - Requires curl; for --fetch-latest, jq is recommended (installed by 00-dependencies.sh) # - Requires curl; for --fetch-latest, jq is recommended (installed by 00-dependencies.sh)
@ -58,12 +60,33 @@ NO_FETCH=0
USE_SYSTEM_LIBS=1 USE_SYSTEM_LIBS=1
AUTO_FALLBACK=0 AUTO_FALLBACK=0
MINIMAL=0 MINIMAL=0
FORCE_UPDATE=0
ONLY_LIST="" ONLY_LIST=""
SKIP_LIST="" SKIP_LIST=""
SET_ARGS=() SET_ARGS=()
usage() { usage() {
sed -n '2,120p' "$0" | sed -n '/^# /p' | sed 's/^# \{0,1\}//' # Print the header comments (quick reference) followed by explicit flags overview
sed -n '2,140p' "$0" | sed -n '/^# /p' | sed 's/^# \{0,1\}//'
cat <<EOF
Options:
-h, --help Show this help and exit
--with-deps Install build dependencies before running
--dry-run Compile only; do not install
--install Compile and install
--fetch-latest Fetch latest releases from GitHub
--force-update Override pinned values in hypr-tags.env (equivalent to FORCE=1)
--restore Restore most recent hypr-tags.env backup
--only LIST Comma-separated subset to build (e.g., hyprland,hyprutils)
--skip LIST Comma-separated modules to skip
--bundled Build Hyprland with bundled hypr* subprojects
--system Prefer system-installed hypr* libraries (default)
--via-helper Use dry-run-build.sh to summarize a dry-run
--minimal Build minimal stack before hyprland
--no-fetch Do not auto-fetch tags on install
--set K=V [...] Set one or more tags (e.g., HYPRLAND=v0.53.0)
EOF
} }
ensure_tags_file() { ensure_tags_file() {
@ -137,6 +160,8 @@ set_tags_from_args() {
fetch_latest_tags() { fetch_latest_tags() {
ensure_tags_file ensure_tags_file
backup_tags backup_tags
CHANGES_FILE="$LOG_DIR/update-delta-$TS.log"
: >"$CHANGES_FILE"
# Require curl; jq is preferred. Fallback to grep/sed if jq is missing. # Require curl; jq is preferred. Fallback to grep/sed if jq is missing.
if ! command -v curl >/dev/null 2>&1; then if ! command -v curl >/dev/null 2>&1; then
@ -194,13 +219,41 @@ fetch_latest_tags() {
map[$k]="$v" map[$k]="$v"
done <"$TAGS_FILE" done <"$TAGS_FILE"
# Build a list of changes (old -> new) according to override rules
changes=()
for k in "${!tags[@]}"; do for k in "${!tags[@]}"; do
# Only override if pinned value is 'auto' or 'latest' if [[ $FORCE_UPDATE -eq 1 ]]; then
if [[ "${existing[$k]:-}" =~ ^(auto|latest)$ ]] || [[ -z "${existing[$k]:-}" ]]; then # Force override regardless of current value (matches FORCE=1 behavior in refresh-hypr-tags.sh)
map[$k]="${tags[$k]}" map[$k]="${tags[$k]}"
else
# 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 fi
done done
# Interactive confirmation before writing, if we have a TTY
if [[ -t 0 && ${#changes[@]} -gt 0 ]]; then
printf "\nPlanned tag updates (update-hyprland.sh):\n" | tee -a "$SUMMARY_LOG"
printf "%s\n" "${changes[@]}" | tee -a "$SUMMARY_LOG" | tee -a "$CHANGES_FILE"
printf "\nProceed with writing updated tags to %s? [Y/n]: " "$TAGS_FILE"
read -r ans || true
ans=${ans:-Y}
case "$ans" in
[nN]|[nN][oO])
echo "[INFO] User aborted tag update; leaving $TAGS_FILE unchanged." | tee -a "$SUMMARY_LOG"
# restore original copy
latest_bak=$(ls -1t "$TAGS_FILE".bak-* 2>/dev/null | head -n1 || true)
[[ -n "$latest_bak" ]] && cp "$latest_bak" "$TAGS_FILE"
return 0
;;
esac
else
# non-interactive: still record changes
printf "%s\n" "${changes[@]}" >>"$CHANGES_FILE" || true
fi
{ {
for k in "${!map[@]}"; do for k in "${!map[@]}"; do
echo "$k=${map[$k]}" echo "$k=${map[$k]}"
@ -451,11 +504,21 @@ run_stack() {
done done
{ {
echo "\nSummary:" printf "\nSummary:\n"
for mod in "${modules[@]}"; do for mod in "${modules[@]}"; do
printf "%-24s %s\n" "$mod" "${results[$mod]:-SKIPPED}" printf "%-24s %s\n" "$mod" "${results[$mod]:-SKIPPED}"
done done
echo "\nLogs under: $LOG_DIR. This run: $SUMMARY_LOG" # Show updated versions (final tag values)
if [[ -f "$TAGS_FILE" ]]; then
printf "\nUpdated versions (from %s):\n" "$TAGS_FILE"
grep -E '^[A-Z0-9_]+=' "$TAGS_FILE" | sort
fi
# Include change list if present
if [[ -f "$LOG_DIR/update-delta-$TS.log" ]]; then
printf "\nChanges applied this run:\n"
cat "$LOG_DIR/update-delta-$TS.log"
fi
printf "\nLogs under: %s. This run: %s\n" "$LOG_DIR" "$SUMMARY_LOG"
} | tee -a "$SUMMARY_LOG" } | tee -a "$SUMMARY_LOG"
# Non-zero on any FAILs # Non-zero on any FAILs
@ -489,6 +552,10 @@ while [[ $# -gt 0 ]]; do
FETCH_LATEST=1 FETCH_LATEST=1
shift shift
;; ;;
--force-update)
FORCE_UPDATE=1
shift
;;
--restore) --restore)
RESTORE=1 RESTORE=1
shift shift
@ -547,6 +614,11 @@ fi
ensure_tags_file ensure_tags_file
# Env compatibility: honor FORCE=1 as alias for --force-update
if [[ ${FORCE:-0} -eq 1 ]]; then
FORCE_UPDATE=1
fi
# Apply tag operations # Apply tag operations
if [[ $RESTORE -eq 1 ]]; then if [[ $RESTORE -eq 1 ]]; then
restore_tags restore_tags