Added bootpd program from NetBSD. Supplied by Michael Reifenberg
[unix-history] / libexec / bootpd / newvers.sh
CommitLineData
e24c98a2
MR
1#!/bin/sh -
2#
3# Copyright (c) 1987 Regents of the University of California.
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms are permitted
7# provided that this notice is preserved and that due credit is given
8# to the University of California at Berkeley. The name of the University
9# may not be used to endorse or promote products derived from this
10# software without specific prior written permission. This software
11# is provided ``as is'' without express or implied warranty.
12#
13# @(#)newvers.sh 4.4 (Berkeley) 3/28/88
14#
15if [ ! -r version ]
16then
17 echo 0 > version
18fi
19touch version
20rm -f version.[oc]
21v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date`
22sed -e "s|%VERSION%|#${v}: ${t}|" -e "s|%WHOANDWHERE%|${u}@${h}:${d}|" \
23 < $1 >version.c
24/bin/echo `expr ${v} + 1` > version