From owner-svn-src-all@FreeBSD.ORG Thu May 5 19:17:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF21D1065672; Thu, 5 May 2011 19:17:55 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2E498FC14; Thu, 5 May 2011 19:17:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p45JHtxd012517; Thu, 5 May 2011 19:17:55 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p45JHtar012515; Thu, 5 May 2011 19:17:55 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105051917.p45JHtar012515@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 5 May 2011 19:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221510 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 19:17:56 -0000 Author: nwhitehorn Date: Thu May 5 19:17:55 2011 New Revision: 221510 URL: http://svn.freebsd.org/changeset/base/221510 Log: Simplify this script somewhat, following excellent suggestions from Ed Schouten. Modified: head/release/generate-release.sh Modified: head/release/generate-release.sh ============================================================================== --- head/release/generate-release.sh Thu May 5 19:15:15 2011 (r221509) +++ head/release/generate-release.sh Thu May 5 19:17:55 2011 (r221510) @@ -21,7 +21,9 @@ # mkdir -p $2/usr/src -svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src || exit 1 +set -e # Everything must succeed + +svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src if [ ! -z $CVSUP_HOST ]; then cat > $2/docports-supfile << EOF *default host=$CVSUP_HOST @@ -35,32 +37,33 @@ if [ ! -z $CVSUP_HOST ]; then EOF elif [ ! -z $CVSROOT ]; then cd $2/usr - cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} ports || exit 1 - cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} doc || exit 1 + cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} ports + cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} doc fi cd $2/usr/src -make $MAKE_FLAGS buildworld || exit 1 -make installworld distribution DESTDIR=$2 || exit 1 +make $MAKE_FLAGS buildworld +make installworld distribution DESTDIR=$2 mount -t devfs devfs $2/dev +trap "umount $2/dev" EXIT # Clean up devfs mount on exit if [ ! -z $CVSUP_HOST ]; then cp /etc/resolv.conf $2/etc/resolv.conf # Checkout ports and doc trees - chroot $2 /usr/bin/csup /docports-supfile || exit 1 + chroot $2 /usr/bin/csup /docports-supfile fi if [ -d $2/usr/doc ]; then cp /etc/resolv.conf $2/etc/resolv.conf # Build ports to build the docs, then build the docs - chroot $2 /bin/sh -c 'pkg_add -r docproj || (cd /usr/ports/textproc/docproj && make install clean BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)' || exit 1 - chroot $2 /bin/sh -c "cd /usr/doc && make $MAKE_FLAGS 'FORMATS=html html-split txt' URLS_ABSOLUTE=YES" || exit 1 + chroot $2 /bin/sh -c 'pkg_add -r docproj || (cd /usr/ports/textproc/docproj && make install clean BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)' + chroot $2 make -C /usr/doc $MAKE_FLAGS 'FORMATS=html html-split txt' URLS_ABSOLUTE=YES fi -chroot $2 /bin/sh -c "cd /usr/src && make $MAKE_FLAGS buildworld buildkernel" || exit 1 -chroot $2 /bin/sh -c "cd /usr/src/release && make obj" || exit 1 -chroot $2 /bin/sh -c "cd /usr/src/release && make release" || exit 1 -chroot $2 /bin/sh -c "cd /usr/src/release && make install DESTDIR=/R" || exit 1 +chroot $2 make -C /usr/src $MAKE_FLAGS buildworld buildkernel +chroot $2 make -C /usr/src/release obj +chroot $2 make -C /usr/src/release release +chroot $2 make -C /usr/src/release install DESTDIR=/R