Parcourir la source

[master] Use tput rather than hard-coded escape sequences

Rather than using terminal-specific hard-coded escape sequences that are
not guaranteed to work on all terminals, use the tput utility. Also use
the terminal defined standout mode rather than trying to set a specific
colour. The old way enabled bright yellow text which, while very visible
if your background is black, is all but invisible if your terminal
background is white.
Kean Johnston il y a 11 ans
Parent
commit
833deb1fce
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      Makefile.am

+ 2 - 2
Makefile.am

@@ -21,11 +21,11 @@ dist_doc_DATA = AUTHORS COPYING ChangeLog README
 .PHONY: check-valgrind check-valgrind-suppress
 
 install-exec-hook:
-	-@echo -e "\033[1;33m" # switch to yellow color text
+	-@tput smso  # Start standout mode
 	@echo "NOTE: BIND 10 does not automatically start DNS services when it is run"
 	@echo "      in its default configuration. Please see the Guide for information"
 	@echo "      on how to configure these services to be started automatically."
-	-@echo -e "\033[m" # switch back to normal
+	-@tput rmso  # End standout mode
 
 check-valgrind:
 if HAVE_VALGRIND