You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
709 B
22 lines
709 B
#!/bin/sh |
|
|
|
PATH=@l_prefix@/bin:${PATH} |
|
|
|
echo "<?xml version='1.0'?>" |
|
echo '<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">' |
|
echo '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">' |
|
|
|
if test $# != 0 ; then |
|
sed -n \ |
|
-e ':input' \ |
|
-e '/PUBLIC[^"]*$/{ N; b input }' \ |
|
-e '/PUBLIC[^"]*"[^"]*$/{ N; b input }' \ |
|
-e '/PUBLIC[^"]*"[^"]*"[^"]*$/{ N; b input }' \ |
|
-e '/PUBLIC[^"]*"[^"]*"[^"]*"[^"]*$/{ N; b input }' \ |
|
-e 's/\n/ /g' \ |
|
-e 's/^ *\(--.*--\)/<!\1>/gp' \ |
|
-e 's/PUBLIC *\("[^"]*"\) *\("[^"]*"\)/<public publicId=\1 uri=\2\/>/gp' \ |
|
"$@" |
|
fi |
|
|
|
echo '</catalog>'
|
|
|