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 1ge03F-00043N-CD for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Dec 2018 16:04:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ge03E-00075L-1k for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Dec 2018 16:04:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ge03D-00075D-NP for pgsql-hackers@lists.postgresql.org; Mon, 31 Dec 2018 16:04:23 +0000 Received: from ssl.nataraj.su ([195.54.209.170]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ge03A-0002iR-Ix for pgsql-hackers@lists.postgresql.org; Mon, 31 Dec 2018 16:04:22 +0000 Received: from x200m.localnet (unknown [91.108.35.130]) by ssl.nataraj.su (Postfix) with ESMTPSA id 547CB511E0EF for ; Mon, 31 Dec 2018 19:04:16 +0300 (MSK) From: Nikolay Shaplov To: PostgreSQL Developers Subject: [PATCH] check for ctags utility in make_ctags Date: Mon, 31 Dec 2018 19:04:08 +0300 Message-ID: <2394207.ccz7JgCJsh@x200m> User-Agent: KMail/5.2.3 (Linux/4.9.0-8-amd64; KDE/5.28.0; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart6275538.QaIfSAG12B" Content-Transfer-Encoding: 7Bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --nextPart6275538.QaIfSAG12B Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hi! 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. This will make life of a person that uses ctags first time in his life a bit easier. I use command -v to detect if ctags command exists. It is POSIX standard and I hope it exist in all shells. --nextPart6275538.QaIfSAG12B Content-Disposition: attachment; filename="check-for-ctags-in-make_ctags.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="check-for-ctags-in-make_ctags.diff" diff --git a/src/tools/make_ctags b/src/tools/make_ctags index 1609c07..edbcd82 100755 --- a/src/tools/make_ctags +++ b/src/tools/make_ctags @@ -2,6 +2,13 @@ # src/tools/make_ctags +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 + trap "rm -f /tmp/$$" 0 1 2 3 15 rm -f ./tags --nextPart6275538.QaIfSAG12B--