File: src2texi

package info (click to toggle)
grub 0.97-27etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 4,576 kB
  • ctags: 8,866
  • sloc: ansic: 38,787; sh: 5,559; asm: 2,014; makefile: 652; perl: 338
file content (16 lines) | stat: -rw-r--r-- 395 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /bin/sh
#
# Convert a source file to a TeXinfo file. Stolen from glibc.
#
# Usage: src2texi SRCDIR SRC TEXI

dir=$1
src=`basename $2`
texi=`basename $3`

sed -e 's,[{}],@&,g'					\
    -e 's,/\*\(@.*\)\*/,\1,g'				\
    -e 's,/\*  *,/* @r{,g' -e 's,  *\*/,} */,'		\
    -e 's/\(@[a-z][a-z]*\)@{\([^}]*\)@}/\1{\2}/g'	\
    ${dir}/${src} | expand > ${texi}.new
mv -f ${texi}.new ${dir}/${texi}