Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gg7lq-0007lB-Mh for pgsql-hackers@arkaria.postgresql.org; Sun, 06 Jan 2019 12:43:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gg7ln-0003k5-8k for pgsql-hackers@arkaria.postgresql.org; Sun, 06 Jan 2019 12:43:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gg7ln-0003iK-1U for pgsql-hackers@lists.postgresql.org; Sun, 06 Jan 2019 12:43:11 +0000 Received: from ssl.nataraj.su ([195.54.209.170]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gg7ll-0004oo-1e for pgsql-hackers@lists.postgresql.org; Sun, 06 Jan 2019 12:43:10 +0000 Received: from x200m.localnet (unknown [91.108.35.130]) by ssl.nataraj.su (Postfix) with ESMTPSA id 38E91511E0C4; Sun, 6 Jan 2019 15:42:37 +0300 (MSK) From: Nikolay Shaplov To: pgsql-hackers@lists.postgresql.org Cc: Peter Eisentraut , Michael Paquier , Tom Lane , =?utf-8?B?0JLQuNGC0YPRgSDQktCw0LPQvdC10YA=?= Subject: Re: [PATCH] check for ctags utility in make_ctags Date: Sun, 06 Jan 2019 15:42:20 +0300 Message-ID: <96675367.WEgyTzNvEp@x200m> User-Agent: KMail/5.2.3 (Linux/4.9.0-8-amd64; KDE/5.28.0; x86_64; ; ) In-Reply-To: <364f4cb7-4f1f-516e-d27e-59578b7cf18c@2ndquadrant.com> References: <2394207.ccz7JgCJsh@x200m> <2205856.meAnofT0VS@x200m> <364f4cb7-4f1f-516e-d27e-59578b7cf18c@2ndquadrant.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =D0=92 =D0=BF=D0=B8=D1=81=D1=8C=D0=BC=D0=B5 =D0=BE=D1=82 =D1=87=D0=B5=D1=82= =D0=B2=D0=B5=D1=80=D0=B3, 3 =D1=8F=D0=BD=D0=B2=D0=B0=D1=80=D1=8F 2019 =D0= =B3. 12:52:36 MSK =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0= =B5=D0=BB=D1=8C Peter=20 Eisentraut =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > >> +1, let's keep it simple. I would just use "ctags/etags not found" > >> as error message. > >=20 > > 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. > >=20 > > So I removed it. See the patch. >=20 > A few more comments. >=20 > 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=20 knows both commands -v and $(). And I have no idea how to get more simple o= ne.=20 Do you have one? Do you know the way how to check if shell is pre-POSIX and just disable the= =20 check in this case. Or can you offer some another check that will satisfy you as a potential us= er=20 of pre-POSIX shell? The check that will somehow report that ctags _executab= le_=20 file is missing.=20 > If etags is not installed, the current script prints >=20 > 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 =46or me it is not good enough error message, it says it can't find some ct= ags| etags file. But says nothing that is is an utility, that is missing... =20 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= =20 scripting, may be you would give some good ideas I do not have.