From 82cbdf6b8e181b24635337fe8f12ed7034f9abdd Mon Sep 17 00:00:00 2001 From: "endico%mozilla.org" Date: Mon, 9 Apr 2001 04:21:18 +0000 Subject: [PATCH] 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 --- mozilla/webtools/newsbot/newsbot.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/mozilla/webtools/newsbot/newsbot.sh b/mozilla/webtools/newsbot/newsbot.sh index 50cc382fd2c..87fd8e448f6 100755 --- a/mozilla/webtools/newsbot/newsbot.sh +++ b/mozilla/webtools/newsbot/newsbot.sh @@ -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