Skip to content

Commit

Permalink
feat(just): add support for ublue-update (#143)
Browse files Browse the repository at this point in the history
* feat(just): add support for ublue-update

* fix: use piped grep
  • Loading branch information
bobslept authored Oct 27, 2023
1 parent f4dc667 commit 6462825
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions build/ublue-os-just/10-update.just
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

# Update system, flatpaks, and containers all at once
update:
rpm-ostree update
flatpak update -y
distrobox upgrade -a
#!/usr/bin/env bash
if systemctl is-enabled ublue-update.timer | grep -q enabled;
then
echo "Starting the ublue-update service"
sudo systemctl start ublue-update.service
else
rpm-ostree update
flatpak update -y
distrobox upgrade -a
fi

# Update device firmware
update-firmware:
Expand All @@ -14,10 +21,24 @@ update-firmware:

# Disable all auto-update timers
disable-updates:
sudo systemctl disable --now flatpak-system-update.timer rpm-ostreed-automatic.timer
systemctl disable --now --user flatpak-user-update.timer
#!/usr/bin/env bash
if systemctl is-enabled ublue-update.timer | grep -q enabled;
then
sudo systemctl disable ublue-update.timer
elif systemctl is-enabled flatpak-system-update.timer | grep -q enabled;
then
sudo systemctl disable --now flatpak-system-update.timer rpm-ostreed-automatic.timer
systemctl disable --now --user flatpak-user-update.timer
fi

# Enable all auto-update timers
enable-updates:
sudo systemctl enable --now flatpak-system-update.timer rpm-ostreed-automatic.timer
systemctl enable --now --user flatpak-user-update.timer
#!/usr/bin/env bash
if systemctl is-enabled ublue-update.timer | grep -q disabled;
then
sudo systemctl enable ublue-update.timer
elif systemctl is-enabled flatpak-system-update.timer | grep -q disabled;
then
sudo systemctl enable --now flatpak-system-update.timer rpm-ostreed-automatic.timer
systemctl enable --now --user flatpak-user-update.timer
fi

0 comments on commit 6462825

Please sign in to comment.