can't reset it if not set up
[unix-history] / usr / src / sys / conf / newvers.sh
index ce0f554..0eb5092 100644 (file)
@@ -1,8 +1,18 @@
-#sccsid        newvers.sh      1.3     85/05/08
-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
-awk '  {       version = $1 + 1; }\
-END    {       printf "static char sccs[4] = '"{'@', '(', '#', ')'}"';\n";\
-               printf "char version[] = \"4.3 BSD UNIX #%d: ", version ;\
-               printf "%d\n", version > "version"; }' > vers.c < version
-echo `date`'\n    '$USER'@'`hostname`':'`pwd`'\n";' >> 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