only attempt to wrap the newsbot file if template and wrap script exist. Sometimes they don't if this script is run while the web site is being rebuilt.

git-svn-id: svn://10.0.0.236/trunk@91730 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
endico%mozilla.org
2001-04-09 04:21:18 +00:00
parent 1aaa375599
commit 82cbdf6b8e

View File

@@ -23,13 +23,22 @@ then
echo "rebuilding newsbot file"
/opt/newsbot/newsbot.pl /var/mail/newsbot /opt/newsbot/newsbot.rdf.tmp > /opt/newsbot/newsbot.html
# copy the rdf file into file used by web site
cp /opt/newsbot/newsbot.rdf.tmp /opt/newsbot/newsbot.rdf
fi
# Do this separately in case wrapnews failed the last time this script ran.
# Sometimes it fails because this script runs at the same time the staging
# area is being rebuilt and the wrapper scripts are missing.
if [ \( /opt/newsbot/newsbot.html -nt /opt/newsbot/index.html \) -a \
\( -e "/e/stage-docs/mozilla-org/tools/wrap.pl" \) -a \
\( -e "/e/stage-docs/mozilla-org/html/template.html" \) ]
then
echo "wrapping newsbot file"
# wrap file and place in newsbot directory
/opt/newsbot/wrapnews.pl
# copy the wrappped file into file used by web site.
cp /opt/newsbot/wrapped.html /opt/newsbot/index.html
# copy the rdf file into file used by web site
cp /opt/newsbot/newsbot.rdf.tmp /opt/newsbot/newsbot.rdf
fi