Debian Codegraph @

debian/csound2man

raw
1 #!/bin/sh
2
3 pkg=csound
4 outdir="debian/_man/${pkg}"
5
6 manpage() {
7 cat <<EOF
8 .TH ${pkg} 1
9
10 .SH NAME
11 Csound \- a powerful and versatile sound synthesis system
12
13 .SH SYNOPSIS
14 @binaries@
15
16 .SH DESCRIPTION
17 Csound is a sound and music synthesis system. Drawing from over 450
18 signal processing modules, it can be used to model virtually any
19 synthesizer or multi-effect processor. It can work either in real-time
20 or as a compiler.
21
22 Try the \fB--help\fP flag for more information on the actual command.
23
24 .SH AUTHOR
25 IOhannes m zmölnig for the Debian project.
26 EOF
27 }
28
29 binaries=$(grep "/bin/" "debian/${pkg}.install" | sed -e 's|.*/||')
30 manbin=$(for b in ${binaries}; do echo -n ".B ${b}@.RI [ OPTIONS ]@.LP@@"; done)
31
32 mantmp=$(mktemp --suffix .1)
33 trap 'rm -rf "${mantmp}"' EXIT INT TERM
34
35 manpage | sed -e "s|@binaries@|${manbin}|" -e 's|@|\n|g' > "${mantmp}"
36
37 mkdir -p "${outdir}"
38 for b in ${binaries}; do
39 cp "${mantmp}" "${outdir}/${b}.1"
40 done