Subject: Re: detecting -current versions
To: R. H. Wood <dwood@rhw.pic.net>
From: Simon J. Gerraty <sjg@zen.void.oz.au>
List: current-users
Date: 09/03/1995 21:32:54
> I like this very much.  I makes good sense to me.  
> 
> But what will the "official" (1.1 or 1.0.1 ?) releases look like?  
> Isn't this mainly useful for -current, only?

Yes.  That's why its only done for --current ($osr ends in A).

Here's my current patch for those that want it.

uname -r gives 1.0A.95.08.18

*** newvers.sh  1995/04/11 08:47:05     1.1.1.1
--- newvers.sh  1995/09/03 03:56:58
***************
*** 47,52 ****
--- 47,62 ----
  ost="NetBSD"
  osr="1.0A"
  
+ case "$osr" in
+ *A)
+         # a -current snapshot, what date?
+         SUP_DATE=${SUP_DATE-/usr/src/sup.date}
+         # the sed command will turn all of YYMMDD, YY.MM.DD etc
+         # into .YY.MM.DD
+         test -s $SUP_DATE && osr="${osr}`sed 's,[^0-9]*\([0-9][0-9]\),.\1,g' $SUP_DATE`"
+         ;;
+ esac
+ 
  echo "char ostype[] = \"${ost}\";" > vers.c
  echo "char osrelease[] = \"${osr}\";" >> vers.c
  echo "char sccs[4] = { '@', '(', '#', ')' };" >> vers.c