=================================================================== RCS file: /cvs/openbsd/update_openbsd/release.sh,v retrieving revision 1.7 retrieving revision 1.13 diff -u -r1.7 -r1.13 --- openbsd/update_openbsd/release.sh 2006/11/07 17:32:10 1.7 +++ openbsd/update_openbsd/release.sh 2007/11/19 22:08:37 1.13 @@ -1,5 +1,5 @@ #!/bin/sh -# $RedRiver: release.sh,v 1.6 2006/11/07 17:09:19 andrew Exp $ +# $RedRiver: release.sh,v 1.12 2007/09/09 21:40:41 andrew Exp $ # Copyright (c) 2002 - 2006, FenderQ # All rights reserved. # @@ -38,13 +38,15 @@ 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" +#CVSROOT="anoncvs@anoncvs3.usa.openbsd.org:/cvs" +#CVSROOT="anoncvs@anoncvs1.usa.openbsd.org:/cvs" +CVSROOT="anoncvs@rt.fm:/cvs" export CVSROOT install_sources() { @@ -59,7 +61,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 } @@ -133,11 +139,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 *****" @@ -149,6 +150,11 @@ echo if [ $# = 0 ]; then usage; exit 1; fi + +if [ `id -u` != "0" ]; then + echo "You probably should be root instead of `whoami` to run this safely." + exit 1 +fi for i in $* do