=================================================================== RCS file: /cvs/openbsd/update_openbsd/release.sh,v retrieving revision 1.34 retrieving revision 1.37 diff -u -r1.34 -r1.37 --- openbsd/update_openbsd/release.sh 2012/05/27 21:48:56 1.34 +++ openbsd/update_openbsd/release.sh 2015/11/27 22:36:12 1.37 @@ -1,5 +1,5 @@ #!/bin/sh -# $AFresh1: release.sh,v 1.33 2010/11/01 22:39:44 andrew Exp $ +# $AFresh1: release.sh,v 1.36 2014/11/27 21:17:46 andrew Exp $ # # Copyright (c) 2002, 2008 Steven Roberts # @@ -54,8 +54,10 @@ local _d for _d in /usr/src "${XSRCDIR}" "${PORTSPATH}"; do if [ -d $_d -a -e $_d/CVS ]; then - echo [$_d] cvs update -r$TAG -Pd - cd $_d && cvs update -r$TAG -Pd || exit 255 + R="-r$TAG" + [ "$TAG" = "HEAD" ] && R="-A" + echo [$_d] cvs update $R -Pd + cd $_d && cvs update $R -Pd || exit 255 fi done } @@ -84,14 +86,14 @@ local _status=0 unset DESTDIR RELEASEDIR empty_dir /usr/obj & -cd /usr/src && nice make obj +cd /usr/src && nice make $BUILD_ARGS obj _status=$? if [ $_status == 0 ]; then cd /usr/src/etc && env DESTDIR=/ $SUDO make distrib-dirs _status=$? fi if [ $_status == 0 ]; then - cd /usr/src && nice make SUDO="${SUDO}" build + cd /usr/src && nice make SUDO="${SUDO}" $BUILD_ARGS build fi if [ $_status != 0 ]; then echo System Build Failed @@ -103,25 +105,25 @@ make_system_release() { echo "---------- Make and validate the system release ----------" -local _status=0 -export DESTDIR=$DEST; export RELEASEDIR=$RELEASE -if [ X"$DESTDIR" == X"" ]; then +if [ X"$DEST" == X"" ]; then echo PLEASE SET \$DEST! >2& - exit + exit 1 fi -mkdir -p $DESTDIR $RELEASEDIR -empty_dir $DESTDIR & -cd /usr/src/etc && ${SUDO} nice make release + +local _status=0 +local DESTDIR RELEASEDIR + +[ -e $DEST ] && empty_dir $DEST +${SUDO} install -d -g wheel -m 775 $DEST $RELEASE + +export DESTDIR=$DEST RELEASEDIR=$RELEASE +cd /usr/src/etc && ${SUDO} nice make SUDO="" release _status=$? -if [ $_status == 0 ]; then - cd /usr/src/distrib/sets && ${SUDO} sh checkflist - _status=$? -fi -unset DESTDIR RELEASEDIR -if [ $_status != 0 ]; then - echo System Release Failed - exit $_status -fi +[ $_status == 0 ] && cd /usr/src/distrib/sets && ${SUDO} sh checkflist +_status=$? + +[ $_status == 0 ] || echo System Release Failed +exit $_status } build_xenocara() { @@ -132,15 +134,15 @@ cd $XSRCDIR _status=$? if [ $_status == 0 ]; then - make bootstrap + make $BUILD_ARGS bootstrap _status=$? fi if [ $_status == 0 ]; then - make obj + make $BUILD_ARGS obj _status=$? fi if [ $_status == 0 ]; then - make build + make $BUILD_ARGS build _status=$? fi if [ $_status != 0 ]; then