Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any way or tool that I can use to receive notifications when any of my macports-packages are out-of-date?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

How about a cron job which runs port outdated and sends email when something is outdated. It could be as simple as this crontab:

MAILTO=Space_C0wb0y@domain.com

0 6 * * * /opt/local/bin/port outdated | /usr/bin/grep -v "No installed ports are outdated."

This will run at 6:00 am everyday. The grep -v removes the "no updates" line if everything is up to date. The MAILTO sets the address that cron will send output to if anything was written to stdout.

share|improve this answer
add comment

My rep is too low to comment on Doug's answer, but don't forget a step to update your repository in the first place! If you don't do that, port outdated can't tell you that anything needs updating, because your installed ports will match your portfiles exactly. However, updating is typically done with sudo port selfupdate. Whether you want to automate scripts with sudo access has pros and cons.

The "proper" way to sync and report on what needs upgrading is:

sudo port selfupdate && port outdated

selfupdate produces a fair amount of output, so I use something like

sudo port sync && port outdated

share|improve this answer
    
Note that selfupdate would also update your base installation, which is something you probably don't want to happen automatically with a cronjob. –  Raim Jun 7 '10 at 18:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.