pkg-stage.sh revision 258307
1#!/bin/sh
2#
3# $FreeBSD: head/release/scripts/pkg-stage.sh 258307 2013-11-18 15:22:55Z gjb $
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/sbin/pkg bootstrap	
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