Re: Unportable use of uname in pg_upgrade test script - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Unportable use of uname in pg_upgrade test script
Date
Msg-id 1349062200.3584.26.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: Unportable use of uname in pg_upgrade test script  (Andrew Dunstan <andrew@dunslane.net>)
List 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@dunslane.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.





pgsql-hackers by date:

Previous
From: Dan Scott
Date:
Subject: Re: Extending range of to_tsvector et al
Next
From: Dan Scott
Date:
Subject: Re: Doc patch, normalize search_path in index