only use .exrc if owned by user or option sourceany is used
[unix-history] / usr / src / sys / conf / newvers.sh
CommitLineData
b1078c35
KM
1#!/bin/sh -
2#
3# Copyright (c) 1980 Regents of the University of California.
4# All rights reserved. The Berkeley software License Agreement
5# specifies the terms and conditions for redistribution.
6#
7# @(#)newvers.sh 1.5 (Berkeley) %G%
8#
dd663e8d
JB
9if [ ! -r version ]; then echo 0 > version; fi
10touch version
84adc984
MK
11echo `cat version` ${USER-root} `pwd` `date` `hostname` | \
12awk ' {
13 version = $1 + 1; user = $2; host = $10; dir = $3; \
14 date = $4 " " $5 " " $6 " " $7 " " $8 " " $9;
15}\
16END {
17 printf "char sccs[] = \"@(#)4.3 BSD #%d: %s (%s@%s:%s)\\n\";\n",\
18 version, date, user, host, dir ;\
19 printf "char version[] = \"4.3 BSD UNIX #%d: %s\\n", \
20 version, date; \
21 printf " %s@%s:%s\\n\";\n", user, host, dir;
22 printf "%d\n", version > "version";
23}' > vers.c