Improve missing-program error handling in make_ctags and make_etags.

If ctags (resp. etags) isn't installed, these scripts naturally fail,
but the error messages were less clear than one could wish.
It seems worth installing an explicit test to improve that.

Nikolay Shaplov, with suggestions from Michael Paquier and Andrew Dunstan

Discussion: https://postgr.es/m/2394207.ccz7JgCJsh@x200m
This commit is contained in:
Tom Lane 2019-01-13 13:33:50 -05:00
parent 9f527a6e9a
commit 52a301e0d9
2 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,9 @@
# src/tools/make_ctags # src/tools/make_ctags
command -v ctags >/dev/null || \
{ echo "'ctags' program not found" 1>&2; exit 1; }
trap "rm -f /tmp/$$" 0 1 2 3 15 trap "rm -f /tmp/$$" 0 1 2 3 15
rm -f ./tags rm -f ./tags

View File

@ -2,6 +2,9 @@
# src/tools/make_etags # src/tools/make_etags
command -v etags >/dev/null || \
{ echo "'etags' program not found" 1>&2; exit 1; }
rm -f ./TAGS rm -f ./TAGS
find `pwd`/ -type f -name '*.[chyl]' -print | find `pwd`/ -type f -name '*.[chyl]' -print |