public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Distinguishing between XP / Vista / 7
@ 2009-09-09 10:49 Fergus
  2009-09-09 11:06 ` Andy Koppe
  0 siblings, 1 reply; 2+ messages in thread
From: Fergus @ 2009-09-09 10:49 UTC (permalink / raw)
  To: Cygwin ML; +Cc: Fergus

To distinguish the host OS (XP or Vista) for an application I have used

#! /bin/bash
case `uname` in
*NT-5*)
  OS_VER=XP
  ;;
*NT-6*)
  OS_VER=Vista
  ;;
esac
echo $OS_VER

Now I find I need to distinguish between Vista and 7 but uname does not 
provide
a discriminant (CYGWIN_NT-6.1 in both cases, I think?).

Can anybody suggest how to do this, please?

Thank you.

Fergus

PS Can anybody running 98 with Cygwin [1.5] tell me what uname gives them?


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Distinguishing between XP / Vista / 7
  2009-09-09 10:49 Distinguishing between XP / Vista / 7 Fergus
@ 2009-09-09 11:06 ` Andy Koppe
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Koppe @ 2009-09-09 11:06 UTC (permalink / raw)
  To: cygwin

2009/9/9 Fergus:
> Now I find I need to distinguish between Vista and 7 but uname does not
> provide a discriminant (CYGWIN_NT-6.1 in both cases, I think?).

Vista is 6.0.

Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-09 11:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-09 10:49 Distinguishing between XP / Vista / 7 Fergus
2009-09-09 11:06 ` Andy Koppe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).