A little script to announce Homebrew doctor anomalies (`brew doctor) in the OS X Notification Center.
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
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.
- 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
.
Here is a little overview on writing launchd-entries.
- Copy the example launch agent file into your user library:
cp opt/homebrew.sick-doctor-warning.plist ~/Library/LaunchAgents/homebrew.sick-doctor-warning.plist
- Modify the starting times and and other settings to your flavour
- Start with
launchctl load ~/Library/LaunchAgents/homebrew.sick-doctor-warning.plist
. (You can halt the process by using unload as launchctl command).
1.0.0