import cinit from unix.schottelius.org
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
parent
3729fc68eb
commit
423ba10303
13396 changed files with 269468 additions and 0 deletions
57
software/cinit/browse_source/cinit-0.3pre10/bin/cdoc-man.sh
Normal file
57
software/cinit/browse_source/cinit-0.3pre10/bin/cdoc-man.sh
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Nico Schottelius <nico-linux@schottelius.org>
|
||||
# Date: 21-Aug-2005
|
||||
# Last Modified: -
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
[ $# -ne 1 ] && exit 23
|
||||
|
||||
SRC=$1
|
||||
|
||||
cd "$SRC"
|
||||
|
||||
#
|
||||
# Title heading
|
||||
#
|
||||
echo .TH $(cat "meta/name" "meta/man_section" "meta/date")
|
||||
|
||||
#
|
||||
# Name
|
||||
#
|
||||
echo .SH NAME
|
||||
echo $(cat meta/name) - $(cat meta/short_description)
|
||||
|
||||
#
|
||||
# Synopsis
|
||||
#
|
||||
echo .SH SYNOPSIS
|
||||
echo $(cat path) $(cat parameters)
|
||||
|
||||
#
|
||||
# description
|
||||
#
|
||||
echo .SH DESCRIPTION
|
||||
echo $(cat long_description)
|
||||
|
||||
#
|
||||
# availability
|
||||
#
|
||||
for section in availability examples "see also" author; do
|
||||
if [ -f "$section" ]; then
|
||||
echo .SH $section | tr '[a-z]' '[A-Z]'
|
||||
cat "$section"
|
||||
fi
|
||||
done
|
||||
|
||||
#
|
||||
# files
|
||||
#
|
||||
if [ -f files ]; then
|
||||
echo .SH FILES
|
||||
cat files | sed 's/\(.*\)/.IP "\1" /'
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue