source: freebsd-mgnt/unattended-update.sh@ 372

Last change on this file since 372 was 365, checked in by Rick van der Zwet, 13 years ago

Let's see if this is a better/faster way of upgrading packages and ports.

  • Property svn:executable set to *
File size: 681 bytes
RevLine 
[365]1#!/bin/sh
2#
3# Unattended FreeBSD Ports upgrade cycle, please note that starting and stopping
4# of services is taken care of in the pkgtools.conf
5#
6# Rick van der Zwet <info@rickvanderzwet.nl>
7#
8PATH=$PATH:/usr/local/sbin:/usr/local/bin
9WC=`cd $(dirname $0); pwd -P`
10export PKGTOOLS_CONF=$WC/pkgtools.conf
11
12if [ `id -u` -ne 0 ]; then
13 echo "Root only!" 1>&2
14 exit 1
15fi
16
17# Fetch the latest details and provide listing of packages to be updated
18portsnap fetch update || exit 1
19portversion -vL= || exit 1
20
21# Make sure the internal database is consistent
22pkgdb -Fa || exit 1
23
24# Fetch all required sources first
25portupgrade -aFR || exit 1
26
27# Install all new packages
28portupgrade -aR
29
Note: See TracBrowser for help on using the repository browser.