From 160eabb8c0626a123afa0265f0c7955f316f94fb Mon Sep 17 00:00:00 2001 From: "Rodney W. Grimes" Date: Thu, 13 Jul 1995 10:54:23 +0000 Subject: [PATCH] This is a major rework of newvers.sh to put it back much closer to what CSRG had, plus make things like, TYPE, REVISION, and BRANCH easy to set, and derive RELEASE and VERSION from them. Kill the JUST_TELL_ME hack, it is no longer needed. Kill DISTNAME, I could find no reveference to it any place in the source tree. Now I just need to rework a few bits in release/Makefile, but want to wait and talk to jkh about that. Oh, and your now all running: TYPE="FreeBSD" REVISION="2.2" BRANCH="CURRENT" and the -BUILD-yymmdd is dead and gone. The date was already in the version[] string, no need for it to be there in 2 formats! --- sys/conf/newvers.sh | 42 +++++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index aac4bd353fbc..b0858a6edce6 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -32,32 +32,28 @@ # SUCH DAMAGE. # # @(#)newvers.sh 8.1 (Berkeley) 4/20/94 -# $Id: newvers.sh,v 1.15 1995/04/22 21:39:15 phk Exp $ +# $Id: newvers.sh,v 1.16 1995/05/02 22:20:03 phk Exp $ TYPE="FreeBSD" -RELEASE="2.0-CURRENT" +REVISION="2.2" +BRANCH="CURRENT" +RELEASE="${REVISION}-${BRANCH}" +VERSION="${TYPE} ${RELEASE}" + RELDATE="199504" -if [ "x$RELEASE" = x2.0-CURRENT ] ; then - RELEASE=`date '+2.0-BUILT-%Y%m%d'` -fi - -DISTNAME=${RELEASE} - -if [ "x$JUST_TELL_ME" = "x" ] +if [ ! -r version ] then - if [ ! -r version ] - then - echo 0 > version - fi - - touch version - v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date` - echo "char ostype[] = \"${TYPE}\";" > vers.c - echo "char osrelease[] = \"${RELEASE}\";" >> vers.c - echo "int osreldate = ${RELDATE};" >> vers.c - echo "char sccs[4] = { '@', '(', '#', ')' };" >>vers.c - echo "char version[] = \"${TYPE} ${RELEASE} #${v}: ${t}\\n ${u}@${h}:${d}\\n\";" >>vers.c - - echo `expr ${v} + 1` > version + echo 0 > version fi + +touch version +v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date` +echo "char ostype[] = \"${TYPE}\";" > vers.c +echo "char osrelease[] = \"${RELEASE}\";" >> vers.c +echo "int osreldate = ${RELDATE};" >> vers.c +echo "char sccs[4] = { '@', '(', '#', ')' };" >>vers.c +echo "char version[] = \ + \"${VERSION} #${v}: ${t}\\n ${u}@${h}:${d}\\n\";" >>vers.c + +echo `expr ${v} + 1` > version