2005-05-28 14:27:59 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
#STYLESHEET=/home/teastep/Shorewall/docbook-xsl-1.62.4//xhtml/docbook.xsl
|
2007-01-19 23:08:13 +01:00
|
|
|
STYLESHEET=/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl
|
2005-05-28 14:27:59 +02:00
|
|
|
WEBSITE=/home/teastep/Shorewall/Website
|
2005-07-08 18:27:34 +02:00
|
|
|
HTMFILES="
|
|
|
|
6to4.htm
|
|
|
|
blacklisting_support.htm
|
|
|
|
configuration_file_basics.htm
|
|
|
|
CorpNetwork.htm
|
|
|
|
dhcp.htm
|
|
|
|
Documentation.htm
|
|
|
|
errata.htm
|
|
|
|
fallback.htm
|
|
|
|
FAQ.htm
|
|
|
|
GnuCopyright.htm
|
|
|
|
Install.htm
|
|
|
|
IPIP.htm
|
|
|
|
IPSEC.htm
|
|
|
|
kernel.htm
|
|
|
|
myfiles.htm
|
|
|
|
NAT.htm
|
|
|
|
ports.htm
|
|
|
|
PPTP.htm
|
|
|
|
ProxyARP.htm
|
|
|
|
quotes.htm
|
|
|
|
samba.htm
|
|
|
|
shorewall_extension_scripts.htm
|
|
|
|
shorewall_features.htm
|
|
|
|
shorewall_mirrors.htm
|
|
|
|
shorewall_prerequisites.htm
|
|
|
|
shorewall_quickstart_guide.htm
|
|
|
|
shorewall_setup_guide_fr.htm
|
|
|
|
shorewall_setup_guide.htm
|
|
|
|
Shorewall_sfindex_frame.htm
|
|
|
|
standalone.htm
|
|
|
|
starting_and_stopping_shorewall.htm
|
|
|
|
support.htm
|
|
|
|
three-interface.htm
|
|
|
|
traffic_shaping.htm
|
|
|
|
troubleshoot.htm
|
|
|
|
two-interface.htm
|
|
|
|
upgrade_issues.htm
|
|
|
|
VPN.htm
|
|
|
|
whitelisting_under_shorewall.htm"
|
2007-01-19 23:48:34 +01:00
|
|
|
#
|
|
|
|
# Suppress the table of contents in these short articles
|
|
|
|
#
|
2007-01-19 23:08:13 +01:00
|
|
|
NOTOC="
|
|
|
|
Documentation_Index.xml
|
2007-01-19 23:48:34 +01:00
|
|
|
ECN.xml
|
|
|
|
fallback.xml
|
2007-01-19 23:08:13 +01:00
|
|
|
GettingStarted.xml
|
2007-01-19 23:48:34 +01:00
|
|
|
IPP2P.xml
|
|
|
|
ping.xml
|
2007-01-19 23:08:13 +01:00
|
|
|
ProxyARP.xml
|
2007-01-20 20:43:47 +01:00
|
|
|
Shorewall_Doesnt.xml
|
2007-01-19 23:48:34 +01:00
|
|
|
shorewall_features.xml
|
|
|
|
shorewall_prerequisites.xml
|
|
|
|
SimpleBridge.xml"
|
2007-01-19 23:08:13 +01:00
|
|
|
|
2005-07-08 18:27:34 +02:00
|
|
|
list_search() # $1 = element to search for , $2-$n = list
|
|
|
|
{
|
|
|
|
local e=$1
|
|
|
|
|
|
|
|
while [ $# -gt 1 ]; do
|
|
|
|
shift
|
|
|
|
[ "x$e" = "x$1" ] && return 0
|
|
|
|
done
|
|
|
|
|
|
|
|
return 1
|
|
|
|
}
|
2005-05-28 14:27:59 +02:00
|
|
|
|
|
|
|
if [ $# -eq 0 ]; then
|
|
|
|
echo "Usage: $(basename $0) <XML file> ..."
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
while [ $# -gt 0 ]; do
|
|
|
|
|
|
|
|
case $1 in
|
|
|
|
*.xml)
|
|
|
|
b=${1%.*}
|
2005-07-23 00:43:08 +02:00
|
|
|
#
|
|
|
|
# The original HTML documents were created using MS FrontPage and
|
|
|
|
# used the .htm suffix. The remainder use the .html suffix.
|
|
|
|
#
|
2005-07-08 18:27:34 +02:00
|
|
|
if list_search $b.htm $HTMFILES ; then
|
2005-05-28 14:27:59 +02:00
|
|
|
b=$b.htm
|
|
|
|
f="$WEBSITE/$b"
|
|
|
|
else
|
|
|
|
b=$b.html
|
|
|
|
f="$WEBSITE/$b"
|
|
|
|
fi
|
|
|
|
|
2007-01-22 17:04:11 +01:00
|
|
|
list_search $1 $NOTOC && GENTOC="--stringparam generate.toc ''" || GENTOC=
|
2007-01-19 23:08:13 +01:00
|
|
|
|
2007-08-08 21:59:40 +02:00
|
|
|
case $1 in
|
|
|
|
*_ru.xml)
|
|
|
|
LANGUAGE="--stringparam l10n.gentext.default.language ru"
|
|
|
|
;;
|
|
|
|
*_fr.xml)
|
2007-08-08 22:21:01 +02:00
|
|
|
LANGUAGE="--stringparam l10n.gentext.default.language fr"
|
2007-08-08 21:59:40 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
LANGUAGE=
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
echo "Converting $1 from XML to HTML ($b) ..."
|
|
|
|
|
2007-08-08 21:59:40 +02:00
|
|
|
if xmllint --valid --noout $1 && xsltproc --output $f --stringparam html.stylesheet html.css --stringparam ulink.target _self $GENTOC $LANGUAGE --param toc.section.depth 3 $STYLESHEET $1 ; then
|
2005-05-28 14:27:59 +02:00
|
|
|
filestocopy="$filestocopy $f"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
filestocopy="$filestocopy $1"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
shift
|
|
|
|
|
|
|
|
done
|
|
|
|
|
2005-07-18 12:07:49 +02:00
|
|
|
DESTS="
|
2007-06-21 20:08:51 +02:00
|
|
|
webadmin@mail.shorewall.net:/srv/www/html
|
2005-07-18 12:07:49 +02:00
|
|
|
"
|
|
|
|
|
2005-05-28 14:27:59 +02:00
|
|
|
if [ -n "$filestocopy" ]; then
|
|
|
|
for f in $filestocopy; do
|
|
|
|
filestoreport="$filestoreport $(basename $f)"
|
|
|
|
done
|
|
|
|
|
2005-07-18 12:31:18 +02:00
|
|
|
chmod 664 $filestocopy
|
2005-07-18 12:07:49 +02:00
|
|
|
for d in $DESTS; do
|
|
|
|
echo "$filestoreport -> $d"
|
|
|
|
scp -qp $filestocopy $d
|
|
|
|
done
|
2005-05-28 14:27:59 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
|