148351Speter#!/bin/sh -
248351Speter#
359874Speter# $FreeBSD$
448351Speter#	$NetBSD: newvers.sh,v 1.1 1997/07/26 01:50:38 thorpej Exp $
548351Speter#
648351Speter# Copyright (c) 1984, 1986, 1990, 1993
748351Speter#	The Regents of the University of California.  All rights reserved.
848351Speter#
948351Speter# Redistribution and use in source and binary forms, with or without
1048351Speter# modification, are permitted provided that the following conditions
1148351Speter# are met:
1248351Speter# 1. Redistributions of source code must retain the above copyright
1348351Speter#    notice, this list of conditions and the following disclaimer.
1448351Speter# 2. Redistributions in binary form must reproduce the above copyright
1548351Speter#    notice, this list of conditions and the following disclaimer in the
1648351Speter#    documentation and/or other materials provided with the distribution.
1748351Speter# 4. Neither the name of the University nor the names of its contributors
1848351Speter#    may be used to endorse or promote products derived from this software
1948351Speter#    without specific prior written permission.
2048351Speter#
2148351Speter# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2248351Speter# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2348351Speter# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2448351Speter# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2548351Speter# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2648351Speter# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2748351Speter# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2848351Speter# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2948351Speter# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3048351Speter# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3148351Speter# SUCH DAMAGE.
3248351Speter#
3348351Speter#	@(#)newvers.sh	8.1 (Berkeley) 4/20/94
3448351Speter
3573349SruLC_ALL=C; export LC_ALL
36131393Spsu=${USER-root} h=${HOSTNAME-`hostname`} t=`date`
3748351Speter#r=`head -n 6 $1 | tail -n 1 | awk -F: ' { print $1 } '`
3848351Speterr=`awk -F: ' /^[0-9]\.[0-9]+:/ { print $1; exit }' $1`
3948351Speter
4048351Speterecho "char bootprog_name[] = \"FreeBSD/${3} ${2}\";" > vers.c
4148351Speterecho "char bootprog_rev[] = \"${r}\";" >> vers.c
4248351Speterecho "char bootprog_date[] = \"${t}\";" >> vers.c
4348351Speterecho "char bootprog_maker[] = \"${u}@${h}\";" >> vers.c
44