#!/bin/sh
if [ -x /usr/bin/xsltproc ];then
	xslt=xsltproc
else
	xslt=sabcmd
fi
dir=`dirname $0`
cd $dir
echo "writing textdb.txt ..."
perl -pe 's/&(\w+;)/%$1/g' xmldb_en.xml > tmp_xmldb_en.xml.$$
$xslt textdb.xslt tmp_xmldb_en.xml.$$ | perl -pe 's/%(\w+;)/&$1/g' > textdb.txt
#
rm -f tmp_xmldb_en.xml.$$
