forked from extern/shorewall_code
Correct STYLESHEET location
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9080 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
10335f52ce
commit
6359961bac
65
tools/web/publish-manpage6
Executable file
65
tools/web/publish-manpage6
Executable file
@ -0,0 +1,65 @@
|
||||
#!/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
|
||||
WEBSITE=/home/teastep/Shorewall/Website
|
||||
|
||||
list_search() # $1 = element to search for , $2-$n = list
|
||||
{
|
||||
local e
|
||||
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="
|
||||
webadmin@mail.shorewall.net:/srv/www/html/manpages6/
|
||||
"
|
||||
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user