Blame tools/parambuild

Packit 0f19cf
#!/bin/sh
Packit 0f19cf
tooldir=`dirname $0`
Packit 0f19cf
tooldir=`cd $tooldir && pwd`
Packit 0f19cf
Packit 0f19cf
# Where to store the synopsis
Packit 0f19cf
synopdir="$1"
Packit 0f19cf
Packit 0f19cf
if [ ! -d $synopdir ]; then
Packit 0f19cf
  echo "$synopdir does not exist"
Packit 0f19cf
  exit 1
Packit 0f19cf
fi
Packit 0f19cf
Packit 0f19cf
# Absolute path
Packit 0f19cf
synopdir=`cd "$synopdir" && pwd`
Packit 0f19cf
if [ "$synopdir" = "" ]; then
Packit 0f19cf
  echo "Cannot go to dir"
Packit 0f19cf
  exit 1
Packit 0f19cf
fi
Packit 0f19cf
Packit 0f19cf
cd $synopdir
Packit 0f19cf
Packit 0f19cf
# Extract the parameters synopsis
Packit 0f19cf
xsltproc --param chunk 1 $tooldir/paramextract.xsl $tooldir/../xsl/docbook.xsl
Packit 0f19cf
Packit 0f19cf
# Strip the xmlns
Packit 0f19cf
for i in *.sxml; do
Packit 0f19cf
  echo $i
Packit 0f19cf
  param=`basename $i .sxml`
Packit 0f19cf
  sed "s/xmlns[^ ]* //" $param.sxml > $param.xml
Packit 0f19cf
  rm $param.sxml
Packit 0f19cf
done
Packit 0f19cf
Packit 0f19cf
cd -
Packit 0f19cf