mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-27 12:35:19 +00:00
fix: add back ujust toggle-updates (#759)
* fix: add back toggle-updates switching to topgrade removed it * chore: remove flatpak-system-update.timer section of the recipe dont think it is needed when we use topgrade
This commit is contained in:
parent
9533c50809
commit
56a963ca57
@ -6,3 +6,31 @@ alias upgrade := update
|
|||||||
update:
|
update:
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
/usr/bin/topgrade --config /usr/share/ublue-os/topgrade.toml --keep
|
/usr/bin/topgrade --config /usr/share/ublue-os/topgrade.toml --keep
|
||||||
|
|
||||||
|
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 <option>"
|
||||||
|
echo " <option>: Specify the quick option - 'enable' or 'disable'"
|
||||||
|
echo " Use 'enable' to Enable automatic updates."
|
||||||
|
echo " Use 'disable' to Disable automatic updates."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if [ "${OPTION,,}" == "enable" ]; then
|
||||||
|
sudo systemctl enable ublue-update.timer
|
||||||
|
elif [ "${OPTION,,}" == "disable" ]; then
|
||||||
|
sudo systemctl disable ublue-update.timer
|
||||||
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user