Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/conf Add new -k (for kernel modules) flag to return MM.9...
details: https://anonhg.NetBSD.org/src/rev/26bb45216c36
branches: trunk
changeset: 777379:26bb45216c36
user: christos <christos%NetBSD.org@localhost>
date: Thu Feb 16 23:56:57 2012 +0000
description:
Add new -k (for kernel modules) flag to return MM.99.pp for current and MM.mm
for the release branch.
diffstat:
sys/conf/osrelease.sh | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diffs (36 lines):
diff -r 3ebe8752d549 -r 26bb45216c36 sys/conf/osrelease.sh
--- a/sys/conf/osrelease.sh Thu Feb 16 23:00:38 2012 +0000
+++ b/sys/conf/osrelease.sh Thu Feb 16 23:56:57 2012 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: osrelease.sh,v 1.121 2012/02/16 17:25:35 christos Exp $
+# $NetBSD: osrelease.sh,v 1.122 2012/02/16 23:56:57 christos Exp $
#
# Copyright (c) 1997 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -54,6 +54,7 @@
# return the next major number (e.g. for 5.99.nn, return 6)
# -n: return MM.mm
# -s: return MMmmpp (no dots)
+# -k: return MM.mm on release branch, MM.mm.pp on current.
option="$1"
@@ -74,6 +75,16 @@
set -- $rel_MM ${rel_mm#0}$beta $*
case "$option" in
+-k)
+ if [ ${rel_mm#0} = 99 ]
+ then
+ IFS=.
+ echo "$*"
+ else
+ echo "${rel_MM}.${rel_mm#0}"
+ fi
+ ;;
+
-m)
echo "$(((${rel_MMmm}+1)/100))"
;;
Home |
Main Index |
Thread Index |
Old Index