1#!/bin/sh 2# 3# $FreeBSD$ 4# 5 6set -e 7 8usage() { 9 echo "$(basename ${0}) /path/to/pkg-stage.conf revision" 10 exit 1 11} 12 13if [ ! -e "${1}" ]; then 14 echo "Configuration file not specified." 15 echo 16 usage 17fi 18 19if [ "$#" -lt 2 ]; then 20 usage 21fi 22 23# Source config file for this architecture. 24REVISION="${2}" 25. "${1}" || exit 1 26 27if [ ! -x /usr/local/sbin/pkg ]; then 28 /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean 29fi 30 31/bin/mkdir -p ${PKG_CACHEDIR} 32 33${PKGCMD} update -f 34${PKGCMD} fetch -d ${DVD_PACKAGES} 35 36${PKGCMD} repo ${PKG_CACHEDIR} 37 38# Always exit '0', even if pkg(8) complains about conflicts. 39exit 0 40