From 3a8b66906ed2287d74a1ff058c1525c89cd53e05 Mon Sep 17 00:00:00 2001 From: perry Date: Mon, 4 Aug 2008 19:30:09 +0000 Subject: [PATCH] Per request from Matt Thomas, make -m on -current print the major number of the next release. --- sys/conf/osrelease.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/conf/osrelease.sh b/sys/conf/osrelease.sh index 6c4198b0e703..8f3522e762e5 100644 --- a/sys/conf/osrelease.sh +++ b/sys/conf/osrelease.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: osrelease.sh,v 1.113 2008/08/04 17:56:52 perry Exp $ +# $NetBSD: osrelease.sh,v 1.114 2008/08/04 19:30:09 perry Exp $ # # Copyright (c) 1997 The NetBSD Foundation, Inc. # All rights reserved. @@ -38,12 +38,12 @@ PARAMH="`dirname $0`"/../sys/param.h release=`$AWK '/^#define[ ]*__NetBSD_Version__/ { print $6 }' $PARAMH` # default: return nn.nn.nn -# -m: return the major number +# -m: return the major number -- -current is the number of the next release # -s: return nnnnnn (no dots) case $1 in -m) - echo $release | $AWK -F. '{print $1}' + echo $release | $AWK -F. '{print int($1+$2/100+0.01)}' ;; -s) echo $release | $SED -e 's,\.,,g'