diff --git a/releng/org.eclipse.rse.releng.infocenter/addSites.sh b/releng/org.eclipse.rse.releng.infocenter/addSites.sh index d03ab704963..050fe986b6f 100755 --- a/releng/org.eclipse.rse.releng.infocenter/addSites.sh +++ b/releng/org.eclipse.rse.releng.infocenter/addSites.sh @@ -1,4 +1,7 @@ #!/bin/sh +# +# Add new Eclipse "extsion locations" to the infocenter +# IHOME=/home/infocenter/latest $IHOME/infocenter.sh addSite -from $IHOME/plugins/rse/eclipse $IHOME/infocenter.sh apply diff --git a/releng/org.eclipse.rse.releng.infocenter/doit_nightly.sh b/releng/org.eclipse.rse.releng.infocenter/doit_nightly.sh new file mode 100755 index 00000000000..ea3b834250a --- /dev/null +++ b/releng/org.eclipse.rse.releng.infocenter/doit_nightly.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +#Find out the IHOME - it's the parent of my own directory ($IHOME/bin) +curdir=`pwd` +cd `dirname $0` +mydir=`pwd` +cd .. +IHOME=`pwd` +export IHOME + +#Update scripts - prerequisite: IHOME is infocenter home +umask 022 +cd "$IHOME/bin" +cvs -q update -d + +#Update the infocenter +./update.sh diff --git a/releng/org.eclipse.rse.releng.infocenter/infocenter.sh b/releng/org.eclipse.rse.releng.infocenter/infocenter.sh index 93fdc6e2f89..69ca2486f19 100755 --- a/releng/org.eclipse.rse.releng.infocenter/infocenter.sh +++ b/releng/org.eclipse.rse.releng.infocenter/infocenter.sh @@ -5,7 +5,9 @@ PATH=/opt/j2sdk1.4.2_12/bin:$PATH export PATH EHOME=/home/infocenter/eclipse3.2/eclipse -IHOME=/home/infocenter/latest +if [ "$IHOME="" ]; then + IHOME=/home/infocenter/latest +fi if [ "$1" = "" -o "$1" = "help" ]; then echo "Usage: infocenter.sh [start|shutdown|addSite -from dir|apply]" diff --git a/releng/org.eclipse.rse.releng.infocenter/readme.txt b/releng/org.eclipse.rse.releng.infocenter/readme.txt index e2d49519b4d..27799ef2895 100644 --- a/releng/org.eclipse.rse.releng.infocenter/readme.txt +++ b/releng/org.eclipse.rse.releng.infocenter/readme.txt @@ -1,4 +1,31 @@ +DSDP Project Infocenter +----------------------- + This project contains scripts needed to run the Eclipse headless infocenter application, serving latest online help from dsdp.eclipse.org. The scripts are written to run by cron job, as user "infocenter", on dsdp.eclipse.org. + +This project can be checked out with + cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/dsdp \ + co -d bin org.eclipse.tm.rse/releng/org.eclipse.tm.rse.releng.infocenter + +Prerequisites: +* Eclipse 3.2 installed at /home/infocenter/eclipse3.2/eclipse +* Infocenter home (IHOME) at /home/infocenter/latest + - Scripts checked out at $IHOME/bin + - Deployable doc plugins at $IHOME/deploy +* Cronjob created to execute doit_nightly.sh + ssh dsdp.eclipse.org -l infocenter + crontab -e + #Run the doc update at 2:00 every weekday + 0 2 * * 1-5 /home/infocenter/latest/bin/doit_nightly.sh + +Other infocenter administration commands: + infocenter.sh shutdown + infocenter.sh start & + +For more documentation on infocenter, see +http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/ua_help_setup_infocenter.htm + +-- Martin Oberhuber, 20-Jul-2006 \ No newline at end of file diff --git a/releng/org.eclipse.rse.releng.infocenter/update.sh b/releng/org.eclipse.rse.releng.infocenter/update.sh index c14109a7877..65bfe55aea0 100755 --- a/releng/org.eclipse.rse.releng.infocenter/update.sh +++ b/releng/org.eclipse.rse.releng.infocenter/update.sh @@ -1,30 +1,52 @@ #!/bin/sh umask 022 -IHOME=/home/infocenter/latest - +if [ "$IHOME" = "" ]; then + IHOME=/home/infocenter/latest +fi curdir=`pwd` +NEED_RESTART=0 -#update RSE +#update RSE into deplopyment directory cd $IHOME/deploy/rse rm * wget "http://download.eclipse.org/dsdp/tm/downloads/drops/N.latest/RSE-SDK-latest.zip" if [ -e RSE-SDK-latest.zip ]; then unzip RSE-SDK-latest.zip - rm -rf plugins - mkdir plugins - mv eclipse/plugins/*doc* plugins + rm -rf plugins.tmp + mkdir plugins.tmp + mv eclipse/plugins/*doc* plugins.tmp rm -rf eclipse - NUM=`ls plugins/*.jar | wc -l` - echo "NUM=$NUM" + NUM=`ls plugins.tmp/*.jar | wc -l` + echo "RSE plugins.tmp: NUM=$NUM" if [ "$NUM" = "3" ]; then - $IHOME/infocenter.sh shutdown - rm $IHOME/plugins/rse/eclipse/plugins/* - cp -p plugins/* $IHOME/plugins/rse/eclipse/plugins/ - cd $IHOME - nohup $IHOME/infocenter.sh start & - echo "Doing fake search to force rebuilding index" - sleep 5 - wget "http://localhost/help/latest/advanced/searchView.jsp?searchWord=SystemBasePlugin&maxHits=2" -O search.out.jsp + rm -rf plugins + mv plugins.tmp plugins + NEED_RESTART=1 fi fi +#update Infocenter with latest deployable plug-ins +if [ "$NEED_RESTART" != "0" ]; then + echo "Shutting down infocenter..." + $IHOME/bin/infocenter.sh shutdown + + echo "Deploying new plug-ins..." + rm $IHOME/plugins/rse/eclipse/plugins/* + cp -p $IHOME/deploy/rse/plugins/* $IHOME/plugins/rse/eclipse/plugins/ + + #TODO: not sure if we need to delete the old index to force re-indexing + echo "Deleting old index..." + rm -rf $IHOME/config/org.eclipse.help.base + + cd $IHOME + echo "Restarting infocenter..." + nohup $IHOME/bin/infocenter.sh start & + echo "Doing fake search to force rebuilding index" + sleep 5 + wget "http://localhost/help/latest/advanced/searchView.jsp?searchWord=SystemBasePlugin&maxHits=2" -O search.out.jsp + echo "Done, index should be up again!" +else + echo "Nothing new deployed, no restart necessary." +fi + +cd "$curdir" \ No newline at end of file