From b05e81776a6ab267035a5a9a8c898d6a79f8a0c7 Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Thu, 16 Feb 2023 17:22:32 +0000 Subject: [PATCH] Be smart about the type of man page we generate. --- tools/bin/new-man | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/bin/new-man b/tools/bin/new-man index 8a942aa..b339650 100755 --- a/tools/bin/new-man +++ b/tools/bin/new-man @@ -25,10 +25,18 @@ fi echo ".Sh NAME" echo ".Nm ${man}" echo ".Nd {SET DESCRIPTION HERE}" - echo ".Sh SYNOPSIS" - echo ".In ${man}.h" + + if [ "$section" = "3" ]; then + echo ".Sh SYNOPSIS" + echo ".In ${man}.h" + fi + echo ".Sh DESCRIPTION" - echo ".Sh RETURN VALUES" + + if [ "$section" = "3" ]; then + echo ".Sh RETURN VALUES" + fi + echo ".Sh SEE ALSO" ) > "$file"