summaryrefslogtreecommitdiffstats
path: root/sys/conf/newvers.sh
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-03-19 07:25:41 +0000
committerphk <phk@FreeBSD.org>1995-03-19 07:25:41 +0000
commit9f5fdc8c9677ff725fc31b568e4f25af4bca29f3 (patch)
tree9ec62294e4d0d0b50145fddc766e6146c420a4bc /sys/conf/newvers.sh
parent6b86bde9b5702677f9452708be50f4513bd8f860 (diff)
downloadFreeBSD-src-9f5fdc8c9677ff725fc31b568e4f25af4bca29f3.zip
FreeBSD-src-9f5fdc8c9677ff725fc31b568e4f25af4bca29f3.tar.gz
Make newvers.sh usable from other places...
Diffstat (limited to 'sys/conf/newvers.sh')
-rw-r--r--sys/conf/newvers.sh31
1 files changed, 19 insertions, 12 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index bbaf2c5..f186384 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -32,19 +32,26 @@
# SUCH DAMAGE.
#
# @(#)newvers.sh 8.1 (Berkeley) 4/20/94
-# $Id: newvers.sh,v 1.6 1994/10/18 01:50:21 phk Exp $
+# $Id: newvers.sh,v 1.7 1994/11/08 21:28:34 phk Exp $
-if [ ! -r version ]
+TYPE="FreeBSD"
+RELEASE="2.1.0-Development"
+RELDATE="199501"
+
+if [ "x$JUST_TELL_ME" = "x" ]
then
- echo 0 > version
-fi
+ if [ ! -r version ]
+ then
+ echo 0 > version
+ fi
-touch version
-v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date`
-echo "char ostype[] = \"FreeBSD\";" > vers.c
-echo "char osrelease[] = \"2.1.0-Development\";" >> vers.c
-echo "int osreldate = 199412;" >> vers.c
-echo "char sccs[4] = { '@', '(', '#', ')' };" >>vers.c
-echo "char version[] = \"FreeBSD 2.1.0-Development #${v}: ${t}\\n ${u}@${h}:${d}\\n\";" >>vers.c
+ touch version
+ v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date`
+ echo "char ostype[] = \"${TYPE}\";" > vers.c
+ echo "char osrelease[] = \"${RELEASE}\";" >> vers.c
+ echo "int osreldate = ${RELDATE};" >> vers.c
+ echo "char sccs[4] = { '@', '(', '#', ')' };" >>vers.c
+ echo "char version[] = \"${TYPE} ${RELEASE} #${v}: ${t}\\n ${u}@${h}:${d}\\n\";" >>vers.c
-echo `expr ${v} + 1` > version
+ echo `expr ${v} + 1` > version
+fi
OpenPOWER on IntegriCloud