File: conv.sh

package info (click to toggle)
khronos-opengl-man4 1.0~svn27841-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 24,888 kB
  • ctags: 377
  • sloc: xml: 188,408; makefile: 1,153; python: 736; sh: 49; php: 7; sed: 2
file content (26 lines) | stat: -rwxr-xr-x 641 bytes parent folder | download | duplicates (4)
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
#!/bin/sh
# Usage: conv.sh srcfile-name
# System copy @ rev 7660
xsl=/usr/share/xml/docbook/stylesheet/docbook5/db4-upgrade.xsl
# Sourceforge HEAD copy @ rev 9783
xsl=rev9783.db4-upgrade.xsl
# Updated with patch from docbook-apps
xsl=db4-upgrade.xsl
echo "Using XSL $xsl"
for arg in $* ; do
    src=$arg
    if test ! -f $file ; then
	echo "No such source file $src, skipping"
	continue
    fi
    dst=`basename $src`
    if test -f $dst ; then
	echo "Destination file $dst already exists, skipping"
	continue
    fi
    cp DOCTYPE.txt $dst
    sed -e 's/&/AMPER/g' < $src | \
	xsltproc $xsl - | \
	sed -e 's/AMPER/\&/g' \
	    >> $dst
done