date and time created 88/12/14 15:29:53 by sklower
[unix-history] / usr / src / sys / conf / newvers.sh
index 2cca3b4..0eb5092 100644 (file)
@@ -1,16 +1,18 @@
-#sccsid        newvers.sh      1.4     85/06/03
-if [ ! -r version ]; then echo 0 > version; fi
+#!/bin/sh -
+#
+# 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) %G%
+#
+if [ ! -r version ]
+then
+       /bin/echo 0 > version
+fi
 touch version
 touch version
-echo `cat version` ${USER-root} `pwd` `date` `hostname` | \
-awk ' {
-       version = $1 + 1; user = $2; host = $10; dir = $3; \
-       date = $4 " " $5 " " $6 " " $7 " " $8 " " $9;
-}\
-END {
-       printf "char sccs[] = \"@(#)4.3 BSD #%d: %s (%s@%s:%s)\\n\";\n",\
-               version, date, user, host, dir ;\
-       printf "char version[] = \"4.3 BSD UNIX #%d: %s\\n", \
-               version, date; \
-       printf "    %s@%s:%s\\n\";\n", user, host, dir;
-       printf "%d\n", version > "version";
-}' > vers.c
+v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date`
+( /bin/echo "char sccs[] = \"@(#)4.3 BSD #${v}: ${t} (${u}@${h}:${d})\\n\";" ;
+  /bin/echo "char version[] = \"4.3 BSD UNIX #${v}: ${t}\\n    ${u}@${h}:${d}\\n\";"
+) > vers.c
+/bin/echo `expr ${v} + 1` > version