Re: [PATCH] check for ctags utility in make_ctags

2019-01-13 Thread Tom Lane
Nikolay Shaplov writes: > [ check-for-ctags-in-make_ctags_v5.diff ] Pushed with minor editorialization on the wording of the error messages. regards, tom lane

Re: [PATCH] check for ctags utility in make_ctags

2019-01-07 Thread Nikolay Shaplov
В письме от воскресенье, 6 января 2019 г. 17:50:36 MSK пользователь Andrew Dunstan написал: > > The correct way to code this is to depend on the exit code, > > not the text output: > > > > if command -v etags >/dev/null > > then > > : ok > > else > > echo etags not found > > exit 1 > > fi

Re: [PATCH] check for ctags utility in make_ctags

2019-01-06 Thread Andrew Dunstan
On 1/6/19 12:16 PM, Tom Lane wrote: > > The correct way to code this is to depend on the exit code, > not the text output: > > if command -v etags >/dev/null > then > : ok > else > echo etags not found > exit 1 > fi more succinctly, command -v etags >/dev/null || { echo etags not

Re: [PATCH] check for ctags utility in make_ctags

2019-01-06 Thread Tom Lane
Nikolay Shaplov writes: > В письме от четверг, 3 января 2019 г. 12:52:36 MSK пользователь Peter > Eisentraut написал: >> 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? TBH, when

Re: [PATCH] check for ctags utility in make_ctags

2019-01-06 Thread Nikolay Shaplov
В письме от четверг, 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

Re: [PATCH] check for ctags utility in make_ctags

2019-01-03 Thread Peter Eisentraut
On 03/01/2019 12:15, Nikolay Shaplov wrote: >> +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 >

Re: [PATCH] check for ctags utility in make_ctags

2019-01-03 Thread Nikolay Shaplov
В письме от четверг, 3 января 2019 г. 10:03:53 MSK пользователь Michael Paquier написал: > On Wed, Jan 02, 2019 at 11:35:46AM -0500, Tom Lane wrote: > > In fact, that's demonstrably not so: on my RHEL6 and Fedora boxes, > > /usr/bin/etags isn't owned by any package, because it's a symlink > >

Re: [PATCH] check for ctags utility in make_ctags

2019-01-02 Thread Michael Paquier
On Wed, Jan 02, 2019 at 11:35:46AM -0500, Tom Lane wrote: > In fact, that's demonstrably not so: on my RHEL6 and Fedora boxes, > /usr/bin/etags isn't owned by any package, because it's a symlink > managed by the "alternatives" system. It points to /usr/bin/etags.emacs > which is owned by the

Re: [PATCH] check for ctags utility in make_ctags

2019-01-02 Thread Tom Lane
Peter Eisentraut writes: > On 01/01/2019 17:44, Nikolay Shaplov wrote: >> +if [ ! $(command -v ctags) ] >> +then >> + echo "'ctags' utility is not found" 1>&2 >> + echo "Please install 'ctags' to run make_ctags" 1>&2 >> + exit 1 >> +fi > This assumes that the ctags and etags programs are part

Re: [PATCH] check for ctags utility in make_ctags

2019-01-02 Thread Peter Eisentraut
On 01/01/2019 17:44, Nikolay Shaplov wrote: > +if [ ! $(command -v ctags) ] > +then > + echo "'ctags' utility is not found" 1>&2 > + echo "Please install 'ctags' to run make_ctags" 1>&2 > + exit 1 > +fi This assumes that the ctags and etags programs are part of packages of the same name. I

Re: [PATCH] check for ctags utility in make_ctags

2019-01-01 Thread Nikolay Shaplov
В письме от вторник, 1 января 2019 г. 11:24:11 MSK пользователь Michael Paquier написал: > Not sure if that's something worse bothering about, but you could do > the same in src/tools/make_etags. Good idea. Done. (I did not do it in the first place because I do not use etags and can't properly

Re: [PATCH] check for ctags utility in make_ctags

2018-12-31 Thread Michael Paquier
On Mon, Dec 31, 2018 at 07:19:39PM +0300, Nikolay Shaplov wrote: > В письме от понедельник, 31 декабря 2018 г. 19:04:08 MSK пользователь Nikolay > Shaplov написал: > >> I'd like to propose a small patch for make_ctags script. It checks if ctags >> utility is intalled or not. If not it reports an

Re: [PATCH] check for ctags utility in make_ctags

2018-12-31 Thread Nikolay Shaplov
В письме от понедельник, 31 декабря 2018 г. 19:04:08 MSK пользователь Nikolay Shaplov написал: > I'd like to propose a small patch for make_ctags script. It checks if ctags > utility is intalled or not. If not it reports an error and advises to > install ctags. Oups. I've misplaced '&' character