Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/conf Make it possible to leave out .note.netbsd.ident wi...



details:   https://anonhg.NetBSD.org/src/rev/95d22dfdb61c
branches:  trunk
changeset: 750102:95d22dfdb61c
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Dec 16 20:54:49 2009 +0000

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

diffstat:

 sys/conf/newvers.sh |  24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diffs (65 lines):

diff -r a8c121361b6e -r 95d22dfdb61c sys/conf/newvers.sh
--- a/sys/conf/newvers.sh       Wed Dec 16 19:02:03 2009 +0000
+++ b/sys/conf/newvers.sh       Wed Dec 16 20:54:49 2009 +0000
@@ -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



Home | Main Index | Thread Index | Old Index