]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - release/scripts/pkg-stage.sh
MFC r258305, r258307, r258308, r258309, r258310, r258314, r258317,
[FreeBSD/stable/10.git] / release / scripts / pkg-stage.sh
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 set -e
7
8 usage() {
9         echo "$(basename ${0}) /path/to/pkg-stage.conf revision"
10         exit 1
11 }
12
13 if [ ! -e "${1}" ]; then
14         echo "Configuration file not specified."
15         echo
16         usage
17 fi
18
19 if [ "$#" -lt 2 ]; then
20         usage
21 fi
22
23 # Source config file for this architecture.
24 REVISION="${2}"
25 . "${1}" || exit 1
26
27 if [ ! -x /usr/local/sbin/pkg ]; then
28         /usr/sbin/pkg bootstrap 
29 fi
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.
39 exit 0