Add 4.0 publish macros

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6655 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-06-23 19:08:24 +00:00
parent 1d59d1ce26
commit a0f87f6287
2 changed files with 137 additions and 0 deletions

130
tools/build/publish-4.0 Executable file
View File

@ -0,0 +1,130 @@
#!/bin/sh
#STYLESHEET=/home/teastep/Shorewall/docbook-xsl-1.62.4//xhtml/docbook.xsl
STYLESHEET=/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl
WEBSITE=/home/teastep/Shorewall/Website
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"
#
# Suppress the table of contents in these short articles
#
NOTOC="
Documentation_Index.xml
ECN.xml
fallback.xml
GettingStarted.xml
IPP2P.xml
ping.xml
ProxyARP.xml
Shorewall_Doesnt.xml
shorewall_features.xml
shorewall_prerequisites.xml
SimpleBridge.xml"
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
}
if [ $# -eq 0 ]; then
echo "Usage: $(basename $0) <XML file> ..."
exit 2
fi
while [ $# -gt 0 ]; do
case $1 in
*.xml)
b=${1%.*}
#
# The original HTML documents were created using MS FrontPage and
# used the .htm suffix. The remainder use the .html suffix.
#
if list_search $b.htm $HTMFILES ; then
b=$b.htm
f="$WEBSITE/$b"
else
b=$b.html
f="$WEBSITE/$b"
fi
list_search $1 $NOTOC && GENTOC="--stringparam generate.toc ''" || GENTOC=
echo "Converting $1 from XML to HTML ($b) ..."
if xmllint --valid --noout $1 && xsltproc --output $f --stringparam html.stylesheet html.css --stringparam ulink.target _self $GENTOC --param toc.section.depth 3 $STYLESHEET $1 ; then
filestocopy="$filestocopy $f"
fi
;;
*)
filestocopy="$filestocopy $1"
;;
esac
shift
done
DESTS="
webadmin@mail.shorewall.net:/srv/www/html/4.0
"
if [ -n "$filestocopy" ]; then
for f in $filestocopy; do
filestoreport="$filestoreport $(basename $f)"
done
chmod 664 $filestocopy
for d in $DESTS; do
echo "$filestoreport -> $d"
scp -qp $filestocopy $d
done
fi

7
tools/build/publish-image-4.0 Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# scp $@ teastep@shorewall.sourceforge.net:/home/groups/s/sh/shorewall/htdocs/images
scp -p $@ webadmin@mail:/srv/www/html/4.0/images
# cp -pf $@ /home/teastep/Shorewall-docs