Module Name: src Committed By: christos Date: Thu Feb 16 23:56:58 UTC 2012
Modified Files: src/sys/conf: osrelease.sh Log Message: Add new -k (for kernel modules) flag to return MM.99.pp for current and MM.mm for the release branch. To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/sys/conf/osrelease.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/conf/osrelease.sh diff -u src/sys/conf/osrelease.sh:1.121 src/sys/conf/osrelease.sh:1.122 --- src/sys/conf/osrelease.sh:1.121 Thu Feb 16 12:25:35 2012 +++ src/sys/conf/osrelease.sh Thu Feb 16 18:56:57 2012 @@ -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))" ;;