all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: Jim Porter <jporterbugs@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: build-aux/git-hooks/pre-push
Date: Tue, 02 May 2023 13:55:02 +0800	[thread overview]
Message-ID: <874jove0qx.fsf@yahoo.com> (raw)
In-Reply-To: <c8ed4a33-35c3-590f-975d-b11911e92514@gmail.com> (Jim Porter's message of "Mon, 1 May 2023 22:35:23 -0700")

Jim Porter <jporterbugs@gmail.com> writes:

> On 4/30/2023 11:33 PM, Po Lu wrote:
>> Btw, I notice that the script falls back to awk if gawk cannot be found.
>> Maybe in that case, the awk script should be rewritten to not utilize
>> getline, sub, function, and other features which do not work with Unix
>> awk?  Or maybe it should try harder to find a POSIX awk?
>
> I'm not sure the best way to do it, but I think trying to find a POSIX
> awk would be the simplest solution.

Hmm, ok.  Unfortunately for some reason the most reliable way to do that
I can think of would be to generate the script with Autoconf... and that
leads to a chicken-egg problem, since the hook is installed from
autogen.sh.

Perhaps we could simply look for:

  - /usr/xpg4/bin/awk
  - mawk
  - nawk

in that order, and not run the script at all if a suitable awk can't be
found.

> That awk script isn't *terribly* complex, but it uses enough POSIX awk
> features that I wouldn't want to try and make it work with UNIX awk
> (even if I knew exactly how to do that).

`(autoconf)Limitations of Usual Tools' describes the limitations of Unix
awk.



  reply	other threads:[~2023-05-02  5:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <875y9cef96.fsf.ref@yahoo.com>
2023-05-01  6:29 ` build-aux/git-hooks/pre-push Po Lu
2023-05-01  6:33   ` build-aux/git-hooks/pre-push Po Lu
2023-05-02  5:35     ` build-aux/git-hooks/pre-push Jim Porter
2023-05-02  5:55       ` Po Lu [this message]
2023-05-01 16:55   ` build-aux/git-hooks/pre-push Jim Porter
2023-05-02  0:08     ` build-aux/git-hooks/pre-push Po Lu
2023-05-04 10:37     ` build-aux/git-hooks/pre-push Basil Contovounesios
2023-05-04 16:28       ` build-aux/git-hooks/pre-push Jim Porter
2023-05-04 16:42         ` build-aux/git-hooks/pre-push Basil Contovounesios
2023-05-04 16:56           ` build-aux/git-hooks/pre-push Jim Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jove0qx.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=emacs-devel@gnu.org \
    --cc=jporterbugs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.