Update Fedora state: 2026-04-28 17:48
This commit is contained in:
commit
10d32b81df
4 changed files with 60 additions and 0 deletions
32
update-apps.sh
Normal file
32
update-apps.sh
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Hash triggers (Script runs if these files change):
|
||||
# dnf: {{ include "apps-dnf.txt" | sha256sum }}
|
||||
# flatpak: {{ include "apps-flatpak.txt" | sha256sum }}
|
||||
# vscode: {{ include "vscode-extensions.txt" | sha256sum }}
|
||||
|
||||
echo "Change detected in Fedora app lists. Restoring environment..."
|
||||
|
||||
# 1. Install DNF Packages
|
||||
if [ -f {{ joinPath .chezmoi.sourceDir "apps-dnf.txt" | quote }} ]; then
|
||||
echo "Installing DNF packages..."
|
||||
sudo dnf install -y $(cat {{ joinPath .chezmoi.sourceDir "apps-dnf.txt" | quote }})
|
||||
fi
|
||||
|
||||
# 2. Install Flatpaks (Very common on Fedora)
|
||||
if [ -f {{ joinPath .chezmoi.sourceDir "apps-flatpak.txt" | quote }} ]; then
|
||||
echo "Installing Flatpaks..."
|
||||
while read -r fp; do
|
||||
flatpak install -y flathub "$fp"
|
||||
done < {{ joinPath .chezmoi.sourceDir "apps-flatpak.txt" | quote }}
|
||||
fi
|
||||
|
||||
# 3. Restore VS Code Extensions
|
||||
if command -v code &> /dev/null; then
|
||||
echo "Restoring VS Code Extensions..."
|
||||
while read -r extension; do
|
||||
code --install-extension "$extension" --force
|
||||
done < {{ joinPath .chezmoi.sourceDir "vscode-extensions.txt" | quote }}
|
||||
fi
|
||||
|
||||
echo "Fedora environment is up to date!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue