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!
This commit is contained in:
Rodney W. Grimes 1995-07-13 10:54:23 +00:00
parent 588d138f56
commit 160eabb8c0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9515

View File

@ -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