Skip to content

About

Setup automatic updates for Homebrew packages

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

33 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🍺 Homebrew Auto-Update

Automates the updating of Homebrew packages on the host and displays a notification when the process is complete.

Compatibility

  • Fedora Silverblue
  • Fedora Kinoite
  • Fedora COSMIC Atomic
  • Fedora Sway Atomic
  • Bluefin
  • Aurora
  • Bazzite
  • Other Fedora Atomic systems compatible with systemd user services

Prerequisites

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

Project Structure

brew-update/
├── install.sh
└── brew-update.sh

Installed Files

After running the installer, the following files will be created:

~/.local/bin/
└── brew-update.sh

~/.config/systemd/user/
├── brew-update.service
└── brew-update.timer

Installation

Run the command below:

curl -fsSL https://raw.githubusercontent.com/diogopessoa/brew-update/main/install.sh | bash

Default Scheduling

The timer is configured to run automatically:

Every Sunday at 01:00

With:

OnCalendar=Sun 01:00:00
Persistent=true

If the computer is turned off at the scheduled time, the update will run the next time the user session starts.

What is executed

The script performs:

brew update
brew upgrade
brew upgrade --cask
brew cleanup -s
brew autoremove

Useful Commands

Check the timer:

systemctl --user status brew-update.timer

Check the service:

systemctl --user status brew-update.service

Show the next appointment:

systemctl --user list-timers brew-update.timer

View logs:

journalctl --user -u brew-update.service

Execute manually:

systemctl --user start brew-update.service

Notifications

Upon successful completion of an update, a graphical notification will be displayed on the desktop.

License

MIT

References

About

Setup automatic updates for Homebrew packages

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages