New publishing macros

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5268 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-01-19 22:08:13 +00:00
parent 5d20a4afe7
commit 7de975d0ea
3 changed files with 84 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh
#STYLESHEET=/home/teastep/Shorewall/docbook-xsl-1.62.4//xhtml/docbook.xsl
STYLESHEET=/usr/share/xml/docbook/stylesheet/nwalsh/current/xhtml/docbook.xsl
STYLESHEET=/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl
WEBSITE=/home/teastep/Shorewall/Website
HTMFILES="
6to4.htm
@ -44,6 +44,12 @@ HTMFILES="
VPN.htm
whitelisting_under_shorewall.htm"
NOTOC="
Documentation_Index.xml
GettingStarted.xml
ProxyARP.xml
shorewall_prerequisites.xml"
list_search() # $1 = element to search for , $2-$n = list
{
local e=$1
@ -78,9 +84,13 @@ while [ $# -gt 0 ]; do
f="$WEBSITE/$b"
fi
GENTOC=
list_search $1 $NOTOC && GENTOC="--stringparam generate.toc ''"
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 -param toc.section.depth 3 $STYLESHEET $1 ; then
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
;;
@ -95,7 +105,7 @@ while [ $# -gt 0 ]; do
done
DESTS="
mail.shorewall.net:/srv/www/html
root@mail.shorewall.net:/srv/www/html
"
if [ -n "$filestocopy" ]; then

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

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

64
tools/build/publish-manpage Executable file
View File

@ -0,0 +1,64 @@
#!/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
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%.*}.html
f="$WEBSITE/$b"
echo "Converting $1 from XML to HTML ($b) ..."
if xsltproc --output $f --stringparam html.stylesheet html.css --stringparam ulink.target _self -param toc.section.depth 3 $STYLESHEET $1 ; then
filestocopy="$filestocopy $f"
fi
;;
*)
filestocopy="$filestocopy $1"
;;
esac
shift
done
DESTS="
root@mail.shorewall.net:/srv/www/html/manpages/
"
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