xref: /illumos-gate/usr/src/grub/grub-0.97/docs/src2texi (revision 3d393ee6c37fa10ac512ed6d36109ad616dc7c1a)
1#! /bin/sh
2#
3# Convert a source file to a TeXinfo file. Stolen from glibc.
4#
5# Usage: src2texi SRCDIR SRC TEXI
6
7dir=$1
8src=`basename $2`
9texi=`basename $3`
10
11sed -e 's,[{}],@&,g'					\
12    -e 's,/\*\(@.*\)\*/,\1,g'				\
13    -e 's,/\*  *,/* @r{,g' -e 's,  *\*/,} */,'		\
14    -e 's/\(@[a-z][a-z]*\)@{\([^}]*\)@}/\1{\2}/g'	\
15    ${dir}/${src} | expand > ${texi}.new
16mv -f ${texi}.new ${dir}/${texi}
17