Deleted Added
full compact
generate-release.sh (227536) generate-release.sh (230106)
1#!/bin/sh
2
3# generate-release.sh: check out source trees, and build release components with
4# totally clean, fresh trees.
5#
1#!/bin/sh
2
3# generate-release.sh: check out source trees, and build release components with
4# totally clean, fresh trees.
5#
6# Usage: generate-release.sh svn-branch scratch-dir
6# Usage: generate-release.sh [-r revision] svn-branch scratch-dir
7#
8# Environment variables:
9# CVSUP_HOST: Host of a cvsup server to obtain the ports and documentation
10# trees. This or CVSROOT must be set to include ports and documentation.
11# CVSROOT: CVS root to obtain the ports and documentation trees. This or
12# CVSUP_HOST must be set to include ports and documentation.
13# CVS_TAG: CVS tag for ports and documentation (HEAD by default)
14# SVNROOT: SVN URL to FreeBSD source repository (by default,
15# svn://svn.freebsd.org/base)
16# MAKE_FLAGS: optional flags to pass to make (e.g. -j)
17# RELSTRING: optional base name for media images (e.g. FreeBSD-9.0-RC2-amd64)
18#
19# Note: Since this requires a chroot, release cross-builds will not work!
20#
7#
8# Environment variables:
9# CVSUP_HOST: Host of a cvsup server to obtain the ports and documentation
10# trees. This or CVSROOT must be set to include ports and documentation.
11# CVSROOT: CVS root to obtain the ports and documentation trees. This or
12# CVSUP_HOST must be set to include ports and documentation.
13# CVS_TAG: CVS tag for ports and documentation (HEAD by default)
14# SVNROOT: SVN URL to FreeBSD source repository (by default,
15# svn://svn.freebsd.org/base)
16# MAKE_FLAGS: optional flags to pass to make (e.g. -j)
17# RELSTRING: optional base name for media images (e.g. FreeBSD-9.0-RC2-amd64)
18#
19# Note: Since this requires a chroot, release cross-builds will not work!
20#
21# $FreeBSD: head/release/generate-release.sh 227536 2011-11-15 18:49:27Z nwhitehorn $
21# $FreeBSD: head/release/generate-release.sh 230106 2012-01-14 09:57:13Z glebius $
22#
23
22#
23
24usage()
25{
26 echo "Usage: $0 [-r revision] svn-branch scratch-dir"
27 exit 1
28}
29
30args=`getopt r: $*`
31if [ $? -ne 0 ]; then
32 usage
33fi
34set -- $args
35REVISION=
36while true; do
37 case "$1" in
38 -r)
39 REVISION="-r $2"
40 shift; shift
41 ;;
42 --)
43 shift; break
44 ;;
45 esac
46done
47
48if [ $# -lt 2 ]; then
49 usage
50fi
51
24mkdir -p $2/usr/src
25set -e # Everything must succeed
26
52mkdir -p $2/usr/src
53set -e # Everything must succeed
54
27svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src
55svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src $REVISION
28if [ ! -z $CVSUP_HOST ]; then
29 cat > $2/docports-supfile << EOF
30 *default host=$CVSUP_HOST
31 *default base=/var/db
32 *default prefix=/usr
33 *default release=cvs tag=${CVS_TAG:-.}
34 *default delete use-rel-suffix
35 *default compress

--- 42 unchanged lines hidden ---
56if [ ! -z $CVSUP_HOST ]; then
57 cat > $2/docports-supfile << EOF
58 *default host=$CVSUP_HOST
59 *default base=/var/db
60 *default prefix=/usr
61 *default release=cvs tag=${CVS_TAG:-.}
62 *default delete use-rel-suffix
63 *default compress

--- 42 unchanged lines hidden ---