#!/bin/sh -
#
# 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1986,1987
# LICENSED MATERIALS - PROPERTY OF IBM
# REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
#
#$Header:newvers.sh 12.0$
#$ACIS:newvers.sh 12.0$
#$Source: /ibm/acis/usr/sys/conf/RCS/newvers.sh,v $
#
# Copyright (c) 1980, 1986 Regents of the University of California.
# All rights reserved.  The Berkeley software License Agreement
# specifies the terms and conditions for redistribution.
#
#	@(#)newvers.sh	7.1 (Berkeley) 6/5/86
#
if [ ! -r version ]
then
	/bin/echo 0 > version
fi
touch version
v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date`
b=`basename $d`
(
# following insures a null character in front of version message
  echo "char versionchar = 0;"
  /bin/echo "char sccs[] = \"@(#)4.3 BSD #${v}: ${t} (${u}@${h}:${d})\\n\";" ;
  /bin/echo "char version[] = \"4.3 BSD UNIX (${b}) #${v}: ${t}\\n    ${u}@${h}:${d}\\n\";"
# pick up the options and put into version_options (while escaping the quotes)
  echo "char version_ident[] = \"`egrep 'IDENT=' makefile | sed 's;\";\\\\\";g'`\n\";" 
  echo "char version_param[] = \"`egrep 'PARAM=' makefile | sed 's;\";\\\\\";g'`\n\";" 
) > vers.c
/bin/echo `expr ${v} + 1` > version
