=================================================================== RCS file: /cvs/openbsd/update_openbsd/release.sh,v retrieving revision 1.6 retrieving revision 1.11 diff -u -r1.6 -r1.11 --- openbsd/update_openbsd/release.sh 2006/11/07 17:09:19 1.6 +++ openbsd/update_openbsd/release.sh 2007/05/04 21:57:34 1.11 @@ -1,5 +1,5 @@ #!/bin/sh -# $RedRiver: release.sh,v 1.5 2006/10/13 18:18:51 andrew Exp $ +# $RedRiver: release.sh,v 1.10 2007/05/04 20:56:34 andrew Exp $ # Copyright (c) 2002 - 2006, FenderQ # All rights reserved. # @@ -38,10 +38,10 @@ DEST="/usr/dest" RELEASE="/usr/release" -CVSTAG=`uname -r | awk '{ sub("\\\.","_"); print "OPENBSD_" $0 }'` +CVSTAG=${CVSTAG:=`uname -sr | tr '[:lower:] .' '[:upper:]_'`} #SOURCES="src ports XF4" #SOURCES="src ports" -SOURCES="src XF4" +SOURCES="src ports XF4" # Anonymous CVS - http://www.openbsd.org/anoncvs.html CVSROOT="anoncvs@anoncvs3.usa.openbsd.org:/cvs" @@ -59,7 +59,11 @@ update_sources() { echo "********** Update sources **********" for d in $SOURCES; do - cd /usr && cvs -q -z6 update -r$CVSTAG -Pd $d + _cvstag=-r$CVSTAG + if [ X"$CVSTAG" == X"HEAD" ]; then + _cvstag=-A + fi + cd /usr && cvs -q -z6 update $_cvstag -Pd $d done } @@ -88,6 +92,7 @@ mkdir -p $DESTDIR $RELEASEDIR cd /usr/src/etc && nice make release cd /usr/src/distrib/sets && sh checkflist + ls $RELEASEDIR | grep -v index.txt | sort > $RELEASEDIR/index.txt unset DESTDIR RELEASEDIR } @@ -107,6 +112,7 @@ mkdir -p $DESTDIR $RELEASEDIR cd /usr/Xbuild && nice make release cd /usr/Xbuild/distrib/sets && sh checkflist + ls $RELEASEDIR | grep -v index.txt | sort > $RELEASEDIR/index.txt unset DESTDIR RELEASEDIR } @@ -131,11 +137,6 @@ echo } -if [ `whoami` != "root" ]; then - echo "You probably should be root instead of `whoami` to run this safely." - exit 1 -fi - START=`date` echo echo "***** OpenBSD - Release Building *****" @@ -147,6 +148,11 @@ echo if [ $# = 0 ]; then usage; exit 1; fi + +if [ `whoami` != "root" ]; then + echo "You probably should be root instead of `whoami` to run this safely." + exit 1 +fi for i in $* do