1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
#!/bin/bash
# fix-manpages.sh
#
# Several manpages in TeX live have smaller or bigger flaws like:
# - international characters from latin1 are not written in their
# encoded form ( instead of \[:a])
# - problems in the first line of the manpage defining wrong section
# or syntactical wrong files
# We fix all these errors on the installed man pages, otherwise lintian
# complains.
#
# Norbert Preining, 2005
# GPL
set -e
tmpfile=`mktemp`
for i in `find debian/ -wholename 'debian/texlive-*/usr/share/man/man?/*' -type f` ; do
bn=`basename $i`
case "$bn" in
ttf2pt1.1)
# fix ttf2pt1.1 first line error
(echo '.TH "ttf2pt1" "1" "Nov 2005" "TeX live" "TeX live"' ; tail --lines=+2 $i ) > $tmpfile
cat $tmpfile > $i
;;
vlna.1)
# fix the NAZEV to NAME in vlna.1
cat $i | sed -e 's/^\.SH NAZEV/.SH NAME/' > $tmpfile
cat $tmpfile > $i
;;
makeindex.1)
# fix section
cat $i | sed -e 's/^\.TH MAKEINDEX 1L /.TH MAKEINDEX 1 /' > $tmpfile
cat $tmpfile > $i
;;
detex.1)
# fix section
cat $i | sed -e 's/^\.TH DETEX 1L /.TH DETEX 1 /' > $tmpfile
cat $tmpfile > $i
;;
dvi2tty.1)
# fix section
cat $i | sed -e 's/^\.TH DVI2TTY Local /.TH DVI2TTY 1 /' > $tmpfile
cat $tmpfile > $i
;;
dvidvi.1)
# fix section
cat $i | sed -e 's/^\.TH DVIDVI L /.TH DVIDVI 1 /' > $tmpfile
cat $tmpfile > $i
;;
fmtutil.1)
# fix section
cat $i | sed -e 's/^\.TH "fmtutil" "8"/.TH "fmtutil" "1"/' > $tmpfile
cat $tmpfile > $i
;;
texlinks.1)
# fix section
cat $i | sed -e 's/^\.TH "texlinks" "8"/.TH "texlinks" "1"/' > $tmpfile
cat $tmpfile > $i
;;
tie.1)
# fix section
cat $i | sed -e 's/^\.TH TIE 1L /.TH TIE 1 /' > $tmpfile
cat $tmpfile > $i
;;
esac
cat $i | sed -e "s/\/\\['o]/g" \
-e "s/\/\\['e]/g" \
-e 's/\/\\[:u]/g' \
-e 's/\/\\[:a]/g' \
-e 's/\/\\[:o]/g' \
-e 's/\/\\[co]/g' \
> $tmpfile
cat $tmpfile > $i
done
rm $tmpfile
|