Module Name:    src
Committed By:   pooka
Date:           Wed Dec 16 20:54:49 UTC 2009

Modified Files:
        src/sys/conf: newvers.sh

Log Message:
Make it possible to leave out .note.netbsd.ident with command line flag -i.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/conf/newvers.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/newvers.sh
diff -u src/sys/conf/newvers.sh:1.54 src/sys/conf/newvers.sh:1.55
--- src/sys/conf/newvers.sh:1.54	Mon Mar 30 16:29:55 2009
+++ src/sys/conf/newvers.sh	Wed Dec 16 20:54:49 2009
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: newvers.sh,v 1.54 2009/03/30 16:29:55 perry Exp $
+#	$NetBSD: newvers.sh,v 1.55 2009/12/16 20:54:49 pooka Exp $
 #
 # Copyright (c) 1984, 1986, 1990, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -47,6 +47,18 @@
 cwd=$(dirname $0)
 copyright=$(awk '{ printf("\"%s\\n\"", $0); }' ${cwd}/copyright)
 
+while [ $# -gt 0 ]; do
+	case "$1" in
+	-r)
+		rflag=-r
+		;;
+	-i)
+		iflag=-i
+	esac
+	echo arg
+	shift
+done
+
 if [ -f ident ]; then
 	id="$(cat ident)"
 else
@@ -58,7 +70,7 @@
 ost="NetBSD"
 osr=$(sh $osrelcmd)
 
-case $1 in
+case "$rflag" in
 -r)
 	fullversion="${ost} ${osr} (${id})\n"
 	;;
@@ -67,6 +79,8 @@
 	;;
 esac
 
+echo $(expr ${v} + 1) > version
+
 cat << _EOF > vers.c
 /*
  * Automatically generated file from $0
@@ -86,6 +100,11 @@
 const char copyright[] =
 ${copyright}
 "\n";
+_EOF
+
+[ "${iflag}" = -i ] && exit 0
+
+cat << _EOF >> vers.c
 
 /*
  * NetBSD identity note.
@@ -109,4 +128,3 @@
 );
 
 _EOF
-echo $(expr ${v} + 1) > version

Reply via email to