Automates the updating of Homebrew packages on the host and displays a notification when the process is complete.
- Fedora Silverblue
- Fedora Kinoite
- Fedora COSMIC Atomic
- Fedora Sway Atomic
- Bluefin
- Aurora
- Bazzite
- Other Fedora Atomic systems compatible with systemd user services
Install Homebrew on the host:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"On Fedora Atomic systems, Homebrew is installed in:
/home/linuxbrew/.linuxbrew
brew-update/
├── install.sh
└── brew-update.sh
After running the installer, the following files will be created:
~/.local/bin/
└── brew-update.sh
~/.config/systemd/user/
├── brew-update.service
└── brew-update.timer
Run the command below:
curl -fsSL https://raw.githubusercontent.com/diogopessoa/brew-update/main/install.sh | bashThe timer is configured to run automatically:
Every Sunday at 01:00
With:
OnCalendar=Sun 01:00:00
Persistent=trueIf the computer is turned off at the scheduled time, the update will run the next time the user session starts.
The script performs:
brew update
brew upgrade
brew upgrade --cask
brew cleanup -s
brew autoremoveCheck the timer:
systemctl --user status brew-update.timerCheck the service:
systemctl --user status brew-update.serviceShow the next appointment:
systemctl --user list-timers brew-update.timerView logs:
journalctl --user -u brew-update.serviceExecute manually:
systemctl --user start brew-update.serviceUpon successful completion of an update, a graphical notification will be displayed on the desktop.
MIT
- Homebrew: https://brew.sh/
- systemd.timer: https://www.freedesktop.org/software/systemd/man/systemd.timer.html