Skip to content

Commit

Permalink
feat(amd): Add LACT to topgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Mar 7, 2024
1 parent 7b7d386 commit cf5e0f0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions system_files/desktop/shared/usr/etc/ublue-os/topgrade.toml
Original file line number Diff line number Diff line change
@@ -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"
18 changes: 18 additions & 0 deletions system_files/desktop/shared/usr/libexec/topgrade/lact-update
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cf5e0f0

Please sign in to comment.