File: parambuild

package info (click to toggle)
dblatex 0.3.4-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 12,004 kB
  • sloc: xml: 100,126; python: 5,478; makefile: 137; sh: 70
file content (34 lines) | stat: -rwxr-xr-x 581 bytes parent folder | download | duplicates (9)
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
#!/bin/sh
tooldir=`dirname $0`
tooldir=`cd $tooldir && pwd`

# Where to store the synopsis
synopdir="$1"

if [ ! -d $synopdir ]; then
  echo "$synopdir does not exist"
  exit 1
fi

# Absolute path
synopdir=`cd "$synopdir" && pwd`
if [ "$synopdir" = "" ]; then
  echo "Cannot go to dir"
  exit 1
fi

cd $synopdir

# Extract the parameters synopsis
xsltproc --param chunk 1 $tooldir/paramextract.xsl $tooldir/../xsl/docbook.xsl

# Strip the xmlns
for i in *.sxml; do
  echo $i
  param=`basename $i .sxml`
  sed "s/xmlns[^ ]* //" $param.sxml > $param.xml
  rm $param.sxml
done

cd -