mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2026-02-05 09:40:14 +01:00
Compare commits
No commits in common. "131fc3b37036690ab7a6e156b57bff2aa259dbbc" and "7434ceac25b8c4e0e649cbb6926768f4376e59f1" have entirely different histories.
131fc3b370
...
7434ceac25
@ -1,17 +1,5 @@
|
|||||||
## 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:
|
||||||
|
|||||||
247
CHANGES_SUMMARY.md
Normal file
247
CHANGES_SUMMARY.md
Normal file
@ -0,0 +1,247 @@
|
|||||||
|
# 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
|
||||||
@ -42,12 +42,6 @@ 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
|
||||||
@ -106,9 +100,6 @@ 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
|
||||||
@ -125,11 +116,8 @@ 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 (respeta versiones fijadas en hypr-tags.env)
|
# Obtiene las últimas etiquetas e instala
|
||||||
./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
|
||||||
@ -266,14 +254,6 @@ 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
|
||||||
|
|||||||
@ -42,12 +42,6 @@ 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
|
||||||
@ -106,9 +100,6 @@ 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
|
||||||
@ -125,11 +116,8 @@ 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 (respects pins in hypr-tags.env)
|
# Fetch latest tags and install
|
||||||
./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
|
||||||
@ -266,14 +254,6 @@ 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
|
||||||
|
|||||||
@ -134,16 +134,11 @@ done
|
|||||||
|
|
||||||
# Summary
|
# Summary
|
||||||
{
|
{
|
||||||
printf "\nSummary (dry-run):\n"
|
echo "\nSummary (dry-run):"
|
||||||
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
|
||||||
# Show current tag values to make changes visible during dry-runs
|
echo "\nLogs: individual module logs are under Install-Logs/. This summary: $SUMMARY_LOG"
|
||||||
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
|
||||||
|
|||||||
@ -1,15 +1,13 @@
|
|||||||
# 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
|
||||||
HYPRUTILS_TAG=v0.10.4
|
HYPRGRAPHICS_TAG=v0.5.0
|
||||||
HYPRLANG_TAG=v0.6.7
|
HYPRLAND_GUIUTILS_TAG=v0.2.0
|
||||||
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_GUIUTILS_TAG=v0.2.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
|
WAYLAND_PROTOCOLS_TAG=1.46
|
||||||
|
|||||||
@ -1,13 +0,0 @@
|
|||||||
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
|
|
||||||
@ -60,7 +60,6 @@ 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"
|
||||||
@ -79,30 +78,12 @@ 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
|
||||||
|
|||||||
@ -17,8 +17,6 @@
|
|||||||
# ./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)
|
||||||
@ -60,33 +58,12 @@ 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() {
|
||||||
# Print the header comments (quick reference) followed by explicit flags overview
|
sed -n '2,120p' "$0" | sed -n '/^# /p' | sed 's/^# \{0,1\}//'
|
||||||
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() {
|
||||||
@ -160,8 +137,6 @@ 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
|
||||||
@ -219,41 +194,13 @@ 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
|
||||||
if [[ $FORCE_UPDATE -eq 1 ]]; then
|
# Only override if pinned value is 'auto' or 'latest'
|
||||||
# Force override regardless of current value (matches FORCE=1 behavior in refresh-hypr-tags.sh)
|
if [[ "${existing[$k]:-}" =~ ^(auto|latest)$ ]] || [[ -z "${existing[$k]:-}" ]]; then
|
||||||
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]}"
|
||||||
@ -504,21 +451,11 @@ run_stack() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
{
|
{
|
||||||
printf "\nSummary:\n"
|
echo "\nSummary:"
|
||||||
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
|
||||||
# Show updated versions (final tag values)
|
echo "\nLogs under: $LOG_DIR. This run: $SUMMARY_LOG"
|
||||||
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
|
||||||
@ -552,10 +489,6 @@ 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
|
||||||
@ -614,11 +547,6 @@ 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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user