From f9beeb124d043d22f2c290d64c9b134f6ffd0413 Mon Sep 17 00:00:00 2001 From: Tulip Blossom Date: Wed, 1 Jan 2025 18:48:32 -0300 Subject: [PATCH] fix: readd old recipes to ujust 10-update.just --- .../usr/share/ublue-os/just/10-update.just | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/system_files/usr/share/ublue-os/just/10-update.just b/system_files/usr/share/ublue-os/just/10-update.just index a3ad345..65b534b 100644 --- a/system_files/usr/share/ublue-os/just/10-update.just +++ b/system_files/usr/share/ublue-os/just/10-update.just @@ -1,2 +1,40 @@ +# vim: set ft=make : + +alias upgrade := update + update: pkexec uupd --log-level debug + +alias auto-update := toggle-updates + +# Turn automatic updates on or off +toggle-updates ACTION="prompt": + #!/usr/bin/bash + source /usr/lib/ujust/ujust.sh + CURRENT_STATE="Disabled" + if systemctl is-enabled ublue-update.timer | grep -q enabled; then + CURRENT_STATE="Enabled" + fi + OPTION={{ ACTION }} + if [ "$OPTION" == "prompt" ]; then + echo "Automatic updates are currently: ${bold}${CURRENT_STATE}${normal}" + echo "Enable or Disable automatic updates?" + OPTION=$(ugum choose Enable Disable) + elif [ "$OPTION" == "help" ]; then + echo "Usage: ujust toggle-updates