Re: [PATCH] check for ctags utility in make_ctags - Mailing list pgsql-hackers

From Nikolay Shaplov
Subject Re: [PATCH] check for ctags utility in make_ctags
Date
Msg-id 96675367.WEgyTzNvEp@x200m
Whole thread Raw
In response to Re: [PATCH] check for ctags utility in make_ctags  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [PATCH] check for ctags utility in make_ctags
List pgsql-hackers
В письме от четверг, 3 января 2019 г. 12:52:36 MSK пользователь Peter
Eisentraut написал:

> >> +1, let's keep it simple.  I would just use "ctags/etags not found"
> >> as error message.
> >
> > Actually I was trying to say "Please install 'ctags' [utility] to run
> > make_ctags". But if all of you read it as "Please install 'ctags'
> > [package] to run make_ctags", then it is really better to drop the
> > advice.
> >
> > So I removed it. See the patch.
>
> A few more comments.
>
> I don't know how portable command -v is.  Some systems have a /bin/sh
> that is pre-POSIX.  Same with $(...).
Do you know how to obtain such a shell in Debian? I have dash for  sh, and it
knows both commands -v and $(). And I have no idea how to get more simple one.
Do you have one?

Do you know the way how to check if shell is pre-POSIX and just disable the
check in this case.

Or can you offer some another check that will satisfy you as a potential user
of pre-POSIX shell? The check that will somehow report that ctags _executable_
file is missing.

> If etags is not installed, the current script prints
>
>     xargs: etags: No such file or directory

make_ctags prints

   xargs: ctags: No such file or directory
   sort: cannot read: tags: No such file or directory

For me it is not good enough error message, it says it can't find some ctags|
etags file. But says nothing that is is an utility, that is missing...

So I would try to find better way to report that ctags utility is missing.

PS Vitus, I added you to CC, because I know that you are quite good in bash
scripting, may be you would give some good ideas I do not have.



pgsql-hackers by date:

Previous
From: Surafel Temesgen
Date:
Subject: Re: START/END line number for COPY FROM
Next
From: Stephen Frost
Date:
Subject: Re: Remove Deprecated Exclusive Backup Mode