pkg-stage.sh revision 258307
1258307Sgjb#!/bin/sh 2258307Sgjb# 3258307Sgjb# $FreeBSD: head/release/scripts/pkg-stage.sh 258307 2013-11-18 15:22:55Z gjb $ 4258307Sgjb# 5258307Sgjb 6258307Sgjbset -e 7258307Sgjb 8258307Sgjbusage() { 9258307Sgjb echo "$(basename ${0}) /path/to/pkg-stage.conf revision" 10258307Sgjb exit 1 11258307Sgjb} 12258307Sgjb 13258307Sgjbif [ ! -e "${1}" ]; then 14258307Sgjb echo "Configuration file not specified." 15258307Sgjb echo 16258307Sgjb usage 17258307Sgjbfi 18258307Sgjb 19258307Sgjbif [ "$#" -lt 2 ]; then 20258307Sgjb usage 21258307Sgjbfi 22258307Sgjb 23258307Sgjb# Source config file for this architecture. 24258307SgjbREVISION="${2}" 25258307Sgjb. "${1}" || exit 1 26258307Sgjb 27258307Sgjbif [ ! -x /usr/local/sbin/pkg ]; then 28258307Sgjb /usr/sbin/pkg bootstrap 29258307Sgjbfi 30258307Sgjb 31258307Sgjb/bin/mkdir -p ${PKG_CACHEDIR} 32258307Sgjb 33258307Sgjb${PKGCMD} update -f 34258307Sgjb${PKGCMD} fetch -d ${DVD_PACKAGES} 35258307Sgjb 36258307Sgjb${PKGCMD} repo ${PKG_CACHEDIR} 37258307Sgjb 38258307Sgjb# Always exit '0', even if pkg(8) complains about conflicts. 39258307Sgjbexit 0 40