src2texi 395 B

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