aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-01-13 13:33:50 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2019-01-13 13:33:50 -0500
commit52a301e0d95aa25aa9bbc0eefd1167458e3e0cab (patch)
tree5ae7c7f2b6961bf71e980d78b99270a172cd64ca
parent9f527a6e9a70ea668616e20d05c31d7a086669a4 (diff)
downloadpostgresql-52a301e0d95aa25aa9bbc0eefd1167458e3e0cab.tar.gz
postgresql-52a301e0d95aa25aa9bbc0eefd1167458e3e0cab.zip
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
-rwxr-xr-xsrc/tools/make_ctags3
-rwxr-xr-xsrc/tools/make_etags3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/make_ctags b/src/tools/make_ctags
index 1609c076754..d8d18d1569f 100755
--- a/src/tools/make_ctags
+++ b/src/tools/make_ctags
@@ -2,6 +2,9 @@
# 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
rm -f ./tags
diff --git a/src/tools/make_etags b/src/tools/make_etags
index 3ce96bc3cab..9288ef7b14b 100755
--- a/src/tools/make_etags
+++ b/src/tools/make_etags
@@ -2,6 +2,9 @@
# src/tools/make_etags
+command -v etags >/dev/null || \
+ { echo "'etags' program not found" 1>&2; exit 1; }
+
rm -f ./TAGS
find `pwd`/ -type f -name '*.[chyl]' -print |