source: freebsd-mgnt/update-via-portmaster.sh@ 369

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

New (better) way of updating ports.

  • Property svn:executable set to *
File size: 663 bytes
Line 
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`
10
11if [ `id -u` -ne 0 ]; then
12 echo "Root only!" 1>&2
13 exit 1
14fi
15
16portmaster --version 1>/dev/null 2>/dev/null || make -C /usr/ports/ports-mgmt/portmaster BATCH=yes install clean
17
18# Fetch the latest details and provide listing of packages to be updated
19portsnap fetch update || exit 1
20
21# Make sure the internal database is consistent
22pkgdb -Fa || exit 1
23
24# Install via portmaster
25portmaster -adG
Note: See TracBrowser for help on using the repository browser.