Add new -k (for kernel modules) flag to return MM.99.pp for current and MM.mm
for the release branch.
This commit is contained in:
parent
52a4c27e3e
commit
f347d465be
@ -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 @@ done
|
||||
# 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 @@ IFS=' '
|
||||
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))"
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user