Skip to content

Instantly share code, notes, and snippets.

@norm
Last active December 14, 2016 03:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norm/ec158737655d5b0605054260522e2f72 to your computer and use it in GitHub Desktop.
Save norm/ec158737655d5b0605054260522e2f72 to your computer and use it in GitHub Desktop.
Get reminders of available updates for software on your Mac from the Mac App Store.

appupdates-notify

Get reminders of available updates for software on your Mac from the Mac App Store.

Install the pre-requisites:

brew install mas terminal-notifier

Copy to your computer:

curl https://gist.githubusercontent.com/norm/ec158737655d5b0605054260522e2f72/raw/appupdates-notify.sh > /usr/local/bin/appupdates-notify
chmod 755 /usr/local/bin/appupdates-notify

Run daily in cron:

00 09 * * * /usr/local/bin/appupdates-notify
#!/bin/sh
OUTDATED=$( mktemp '/tmp/appupdates.XXXXX' )
mas outdated > $OUTDATED
lines=$( wc -l $OUTDATED | awk '{ print $1 }' )
if [ $lines -gt 0 ]; then
cat $OUTDATED \
| terminal-notifier \
-title 'App Store' -subtitle 'Available updates' \
-sender com.apple.appstore -activate com.apple.appstore
fi
rm -f $OUTDATED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment