| From: | Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> |
|---|---|
| To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
| Cc: | Daniel Gustafsson <daniel(at)yesql(dot)se>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pgsql Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: The pgperltidy diffs in HEAD |
| Date: | 2025-11-25 22:03:26 |
| Message-ID: | 87ecpl7osx.fsf@wibble.ilmari.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 2025-11-25 Tu 2:36 PM, Daniel Gustafsson wrote:
>>> On 25 Nov 2025, at 20:31, Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:
>>>
>>> On 2025-Nov-25, Daniel Gustafsson wrote:
>>>
>>>> Agreed. Perhaps something like the attached would work?
>>> Hmm, I got this
>>>
>>> src/tools/pgindent/pgperltidy: 10: [: 0: unexpected operator
>>>
>>> $ ls -l /bin/sh
>>> lrwxrwxrwx 1 root root 4 feb 4 2025 /bin/sh -> dash*
>>>
>>> (Seems to work ok silently with bash.)
>> If you replace the if statement with the one below using test, does that make
>> it work?
>>
>> if test $? = 1; then
>>
>
> Looks to me like your original patch had == where it should have had =
>
> Your formulation above corrects that.
Even simpler, and avoiding having to move the `set -e` after the check:
PERLTIDY_VERSION=20230309
if ! $PERLTIDY -v | grep -q $PERLTIDY_VERSION; then
echo "error: pgperltidy requires perltidy v$PERLTIDY_VERSION"
exit 1
fi
- ilmari
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jacob Champion | 2025-11-25 22:04:53 | Re: The pgperltidy diffs in HEAD |
| Previous Message | M.Atıf Ceylan | 2025-11-25 21:50:52 | [PATCH] psql: add size-based sorting options (O/o) for tables and indexes |