forked from centos-workstation/achillobator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: readd old recipes to ujust 10-update.just
- Loading branch information
1 parent
630b6a5
commit f9beeb1
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <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 | ||
|
||
alias changelog := changelogs | ||
|
||
# Show the changelog | ||
changelogs: | ||
rpm-ostree db diff --changelogs |