From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | "Bruce Momjian" <bruce(at)momjian(dot)us>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, <pgsql-committers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] pgsql: Use strip -x on OS/X-darwinbecause non-"-x" causes link |
Date: | 2007-11-13 18:57:49 |
Message-ID: | 87oddy3rde.fsf@oxford.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
"Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> Hmm, this doesn't seem to work for me:
>
> $ if test expr "`uname -a`" : 'Darwin' -ne 0
>> then stripprog="${STRIPPROG-strip -x}"
>> else stripprog="${STRIPPROG-strip}"
>> fi
> -bash: test: too many arguments
No, "test" and "expr" are separate programs.
The above would be
if test "$(expr "$(uname -a)" : Darwin)" -ne 0 ; then
...
Except the "test" invocation is entirely redundant, expr is already intended
to be used as the program for an if condition. You can just do:
if expr "`uname -a`" : Darwin >/dev/null ; then
...
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's On-Demand Production Tuning
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-11-13 21:02:29 | pgsql: Replace the now-incompatible-with-core contrib/tsearch2 module |
Previous Message | Bruce Momjian | 2007-11-13 18:50:55 | Re: [HACKERS] pgsql: Use strip -x on OS/X-darwin because non-"-x" causes link |
From | Date | Subject | |
---|---|---|---|
Next Message | Doug Knight | 2007-11-13 18:59:15 | Windows psql -f load of files with tabs changing to escape sequences |
Previous Message | Bruce Momjian | 2007-11-13 18:50:55 | Re: [HACKERS] pgsql: Use strip -x on OS/X-darwin because non-"-x" causes link |