Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/conf * support passing ident on the command line
details: https://anonhg.NetBSD.org/src/rev/eb66d93e0507
branches: trunk
changeset: 750105:eb66d93e0507
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Dec 16 21:25:03 2009 +0000
description:
* support passing ident on the command line
* rename -i to -n since it's less confusing when coupled with the above
diffstat:
sys/conf/newvers.sh | 33 ++++++++++++++++++---------------
1 files changed, 18 insertions(+), 15 deletions(-)
diffs (71 lines):
diff -r e6fed6dd7025 -r eb66d93e0507 sys/conf/newvers.sh
--- a/sys/conf/newvers.sh Wed Dec 16 20:59:04 2009 +0000
+++ b/sys/conf/newvers.sh Wed Dec 16 21:25:03 2009 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: newvers.sh,v 1.55 2009/12/16 20:54:49 pooka Exp $
+# $NetBSD: newvers.sh,v 1.56 2009/12/16 21:25:03 pooka Exp $
#
# Copyright (c) 1984, 1986, 1990, 1993
# The Regents of the University of California. All rights reserved.
@@ -50,19 +50,25 @@
while [ $# -gt 0 ]; do
case "$1" in
-r)
- rflag=-r
+ rflag=true
;;
-i)
- iflag=-i
+ id="$2"
+ shift
+ ;;
+ -n)
+ nflag=true
+ ;;
esac
- echo arg
shift
done
-if [ -f ident ]; then
- id="$(cat ident)"
-else
- id=$(basename ${d})
+if [ -z "${id}" ]; then
+ if [ -f ident ]; then
+ id="$(cat ident)"
+ else
+ id=$(basename ${d})
+ fi
fi
osrelcmd=${cwd}/osrelease.sh
@@ -70,14 +76,11 @@
ost="NetBSD"
osr=$(sh $osrelcmd)
-case "$rflag" in
--r)
+if [ ! -z "${rflag}" ]; then
fullversion="${ost} ${osr} (${id})\n"
- ;;
-*)
+else
fullversion="${ost} ${osr} (${id}) #${v}: ${t}\n\t${u}@${h}:${d}\n"
- ;;
-esac
+fi
echo $(expr ${v} + 1) > version
@@ -102,7 +105,7 @@
"\n";
_EOF
-[ "${iflag}" = -i ] && exit 0
+[ ! -z "${nflag}" ] && exit 0
cat << _EOF >> vers.c
Home |
Main Index |
Thread Index |
Old Index