Skip site navigation (1) Skip section navigation (2)

Re: Unportable use of uname in pg_upgrade test script

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Unportable use of uname in pg_upgrade test script
Date: 2012-10-01 03:30:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sat, 2012-09-29 at 13:33 -0400, Andrew Dunstan wrote:
> On 09/29/2012 01:06 PM, Tom Lane wrote:
> > Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> >> The trouble with uname -s is that its output is a bit variable. I think
> >> this will work:
> >>       testhost=`uname -a | sed 's/.* //'`
> > What do you mean by "a bit variable"?
> On one of my machines uname -s return MINGW32_NT5.1
> On another it says MINGW32_NT6.1

You could do

case $testhost in
    MINGW*) something;;

Or call config.guess, which exists more or less for this purpose.

In response to

pgsql-hackers by date

Next:From: Dan ScottDate: 2012-10-01 03:35:42
Subject: Re: Doc patch, normalize search_path in index
Previous:From: Dan ScottDate: 2012-10-01 03:04:24
Subject: Re: Extending range of to_tsvector et al

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group