/homebrew-sick-doctor-warning

A little script to announce Homebrew doctor anomalies

Primary LanguageShellMIT LicenseMIT

macOS Homebrew Sick Doctor Warning

A little script to announce Homebrew doctor anomalies (`brew doctor) in the OS X Notification Center.

Installation

brew install frdmn/formulas/homebrew-sick-doctor-warning
brew services start homebrew-sick-doctor-warning

To automate the execution we can use Homebrew's service subcommand to add it in our launchctl configuration. This will fire the script at login, at 10:01 and at 15:01. (If you want to change this, consider a manual install:

ln -sfv /usr/local/opt/homebrew-sick-doctor-warning/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.homebrew-sick-doctor-warning.plist

Manual Installation

Updates are checked at login, 10:01 and 15:01. If you want to have the script run at other times, consider to manually install everything.

Prerequisites

  • Homebrew, of course.
  • terminal-notifier is for sending the results of the script to the Notification Center. Install with brew install terminal-notifier.

Download the script and place it in your environment path (how about /usr/local/bin?) and give it executable rights: chmod +x /usr/local/bin/homebrew-sick-doctor-warning.

Automation

Here is a little overview on writing launchd-entries.

  1. Copy the example launch agent file into your user library: cp opt/homebrew.sick-doctor-warning.plist ~/Library/LaunchAgents/homebrew.sick-doctor-warning.plist
  2. Modify the starting times and and other settings to your flavour
  3. Start with launchctl load ~/Library/LaunchAgents/homebrew.sick-doctor-warning.plist. (You can halt the process by using unload as launchctl command).

Version

1.0.0

License

MIT