]> granicus.if.org Git - postgresql/commitdiff
Improve missing-program error handling in make_ctags and make_etags.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 13 Jan 2019 18:33:50 +0000 (13:33 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 13 Jan 2019 18:33:50 +0000 (13:33 -0500)
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

src/tools/make_ctags
src/tools/make_etags

index 1609c076754376869bf72560e62b0bc5ed734979..d8d18d1569f984d85e526b99a6e40172797b0132 100755 (executable)
@@ -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
 
index 3ce96bc3cabf626f3ed944f3c71bf2ef5d8ee193..9288ef7b14b44ff25bc847af49c8ebc7b2e6acd2 100755 (executable)
@@ -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 |