From 3a63321bc8b4a6dbebbeba5aec0f0664c1434256 Mon Sep 17 00:00:00 2001 From: Cyril Jaquier Date: Sat, 18 Nov 2006 15:12:22 +0000 Subject: [PATCH] - Use bold font for commands git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@469 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- man/generate-man | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/man/generate-man b/man/generate-man index 61c95d54c..bf4f651e8 100755 --- a/man/generate-man +++ b/man/generate-man @@ -5,7 +5,30 @@ echo -n "Generating fail2ban-client " help2man --section=1 --no-info --include=fail2ban-client.h2m --output fail2ban-client.1 ../fail2ban-client echo "[done]" echo -n "Patching fail2ban-client " +# Changes the title. sed -i -e 's/.SS "Command:"/.SH COMMAND/' fail2ban-client.1 +# Sets bold font for commands. +IFS=" +" +NEXT=0 +FOUND=0 +LINES=$( cat fail2ban-client.1 ) +echo -n "" > fail2ban-client.1 +for LINE in $LINES; do + if [ "$LINE" = ".SH COMMAND" ]; then + FOUND=1 + fi + if [ $NEXT -eq 1 ] && [ $FOUND -eq 1 ]; then + echo "\fB$LINE\fR" >> fail2ban-client.1 + else + echo "$LINE" >> fail2ban-client.1 + fi + if [ "$LINE" = ".TP" ]; then + NEXT=1 + else + NEXT=0 + fi +done echo "[done]" # fail2ban-server