#!/bin/sh
# FreeBSD system upgade script
#
# Licence: BSDLike - http://rickvanderzwet.nl/LICENSE
# Rick van der Zwet <info@rickvanderzwet.nl>

if [ `id -u` -ne 0 ]; then
    echo "Sorry root only" 1>&2
    exit 128
fi

./port-list.sh

# Update port tree
portsnap update

# Update ports
NEWPORTS=`pkg_version -qL=`
portupgrade -r -mBATCH=yes -a $NEWPORTS
