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

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

Auto-updating scripts is always handy.

  • Property svn:executable set to *
File size: 790 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
16# Make sure we always using the latest version
17svn up --non-interactive `dirname $0` | grep '^[A-Z] ' && {
18 sh $0
19 exit 0
20}
21
22portmaster --version 1>/dev/null 2>/dev/null || make -C /usr/ports/ports-mgmt/portmaster BATCH=yes install clean
23
24# Fetch the latest details and provide listing of packages to be updated
25portsnap fetch update || exit 1
26
27# Make sure the internal database is consistent
28pkgdb -Fa || exit 1
29
30# Install via portmaster
31portmaster -adG
Note: See TracBrowser for help on using the repository browser.