feat(amd): Add LACT to topgrade

This commit is contained in:
Kyle Gospodnetich 2024-03-07 14:01:12 -08:00
parent 7b7d3860e5
commit cf5e0f0f3d
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,4 @@
[commands]
"Linux AMDGPU Control Application" = "/usr/libexec/topgrade/lact-update"
"Mozilla GNOME Themes" = "/usr/libexec/topgrade/mozilla-gnome-theme-update"
"Third Party CSS Loader Themes" = "/usr/libexec/topgrade/third-party-css-loader-update"

View File

@ -0,0 +1,18 @@
#!/usr/bin/bash
shopt -s nullglob
echo "Looking for updates..."
if [[ $(rpm -qa | grep lact) ]]; then
LACT_VERSION=$(curl -s https://api.github.com/repos/ilya-zlobintsev/LACT/releases/latest | jq -r '.tag_name | ltrimstr("v")')
if [[ ! $(rpm-ostree status | grep lact | grep $LACT_VERSION) ]]; then
# This will check if *any* rpm-ostree pin has the newest version, so we don't update needlessly if a user just needs to reboot or is trying an older pin.
echo "Found upstream version v$LACT_VERSION, updating..."
/usr/bin/ujust install-lact
echo "Update complete"
fi
else
echo "LACT not installed, skipping."
fi
exit 0