# FreeBSD update, portsnap, UPDATING all in one



## derekschrock (Aug 18, 2011)

There was a link in an old thread for a script posted by DutchDaemon that was an all in one script that did its best to look at installed ports, UPDATING, and freebsd-update.  I can't find that thread nor can I find the thread with the script. DutchDaemon or anyone else know where this script is at on the forums?


----------



## ericmacmini (Aug 18, 2011)

I am running the script below to check the my ports collection. It's problably not what you are looking for, but maybe it helps..


```
#!/bin/bash


E_NOTROOT=87   # Non-root exit error.

# Run as root, of course.

if [ "$(id -u)" != "0" ]; then
  echo "Must be root to run this script."
  exit $E_NOTROOT
fi

/usr/sbin/freebsd-update fetch
/usr/sbin/portsnap fetch update
/usr/sbin/pkg_version -v -l '<'

echo -e "\n===\n\n===> Now, run portupgrade -R as root user.\n\n==="

exit 0
```


----------



## kpa (Aug 18, 2011)

This one? http://forums.freebsd.org/showthread.php?p=39092&highlight=portupdater#post39092

It doesn't use freebsd-update(8) though so you'll have to run that one separately.


----------



## derekschrock (Aug 19, 2011)

Yep, that's it kpa. Thanks.


----------

