2006-08-11 21:09:12 +00:00
|
|
|
#!/bin/sh
|
2006-09-20 11:53:43 +00:00
|
|
|
#*******************************************************************************
|
|
|
|
# Copyright (c) 2006 Wind River Systems, Inc.
|
|
|
|
# All rights reserved. This program and the accompanying materials
|
|
|
|
# are made available under the terms of the Eclipse Public License v1.0
|
|
|
|
# which accompanies this distribution, and is available at
|
|
|
|
# http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
#
|
|
|
|
# Contributors:
|
|
|
|
# Martin Oberhuber - initial API and implementation
|
|
|
|
#*******************************************************************************
|
2006-08-11 21:09:12 +00:00
|
|
|
#Bootstrapping script to perform N-builds on build.eclipse.org
|
|
|
|
|
|
|
|
#nothing we do should be hidden from the world
|
2006-12-12 16:07:05 +00:00
|
|
|
umask 22
|
2006-08-11 21:09:12 +00:00
|
|
|
|
|
|
|
#Use Java5 on build.eclipse.org
|
2007-03-01 10:54:08 +00:00
|
|
|
#export PATH=/shared/dsdp/tm/ibm-java2-ppc64-50/bin:$PATH
|
2006-11-29 17:43:36 +00:00
|
|
|
#export PATH=/shared/webtools/apps/IBMJava2-ppc64-142/bin:$PATH
|
2006-12-14 20:05:23 +00:00
|
|
|
#export PATH=/shared/webtools/apps/IBMJava2-ppc-142/bin:$PATH
|
2007-01-17 17:51:31 +00:00
|
|
|
export PATH=${HOME}/ws2/IBMJava2-ppc-142/bin:$PATH
|
2006-08-11 21:09:12 +00:00
|
|
|
|
|
|
|
curdir=`pwd`
|
|
|
|
|
|
|
|
#Remove old logs and builds
|
|
|
|
echo "Removing old logs and builds..."
|
2007-01-17 19:02:55 +00:00
|
|
|
cd $HOME/ws2
|
2006-08-24 08:32:25 +00:00
|
|
|
rm log-N*.txt
|
|
|
|
if [ -d working/build ]; then
|
|
|
|
rm -rf working/build
|
|
|
|
fi
|
2006-08-11 21:09:12 +00:00
|
|
|
if [ -d working/package ]; then
|
|
|
|
rm -rf working/package
|
|
|
|
fi
|
|
|
|
|
|
|
|
#Do the main job
|
2006-08-24 11:29:51 +00:00
|
|
|
echo "Updating builder from CVS..."
|
2006-08-11 21:09:12 +00:00
|
|
|
cd org.eclipse.rse.build
|
|
|
|
stamp=`date +'%Y%m%d-%H%M'`
|
2007-01-17 17:51:31 +00:00
|
|
|
log=$HOME/ws2/log-N$stamp.txt
|
2006-12-12 16:07:05 +00:00
|
|
|
touch $log
|
|
|
|
cvs -q update -RPd >> $log 2>&1
|
2006-08-11 21:09:12 +00:00
|
|
|
daystamp=`date +'%Y%m%d-%H'`
|
2006-08-24 11:29:51 +00:00
|
|
|
|
|
|
|
echo "Running the builder..."
|
2006-12-12 16:07:05 +00:00
|
|
|
./nightly.sh >> $log 2>&1
|
2008-01-31 08:59:46 +00:00
|
|
|
tail -30 $log
|
2006-08-11 21:09:12 +00:00
|
|
|
|
2007-04-02 13:00:27 +00:00
|
|
|
#update the main download and archive pages: build.eclipse.org only
|
|
|
|
if [ -d /home/data/httpd/archive.eclipse.org/dsdp/tm/downloads ]; then
|
|
|
|
cd /home/data/httpd/archive.eclipse.org/dsdp/tm/downloads
|
|
|
|
cvs -q update -RPd >> $log 2>&1
|
2007-06-11 12:02:56 +00:00
|
|
|
chgrp dsdp-tmadmin * CVS/* 2>/dev/null
|
2007-04-02 13:00:27 +00:00
|
|
|
cd /home/data/httpd/download.eclipse.org/dsdp/tm/downloads
|
|
|
|
cvs -q update -RPd >> $log 2>&1
|
2007-06-11 12:02:56 +00:00
|
|
|
chgrp dsdp-tmadmin * CVS/* 2>/dev/null
|
2007-02-01 10:01:41 +00:00
|
|
|
|
2007-04-02 13:00:27 +00:00
|
|
|
#Fixup permissions and group id on download.eclpse.org (just to be safe)
|
2007-06-11 12:02:56 +00:00
|
|
|
chgrp -R dsdp-tmadmin drops/${buildType}*${daystamp}* 2>/dev/null
|
|
|
|
chmod -R g+w drops/${buildType}*${daystamp}* 2>/dev/null
|
2007-04-02 13:00:27 +00:00
|
|
|
fi
|
2006-08-11 21:09:12 +00:00
|
|
|
|
|
|
|
#Copy latest SDK in order to give access to DOC server
|
2007-01-17 17:51:31 +00:00
|
|
|
cd $HOME/ws2/publish
|
2007-04-02 13:00:27 +00:00
|
|
|
if [ -d N.latest ]; then
|
2007-06-11 11:52:17 +00:00
|
|
|
FILES=`ls -t N${daystamp}*/RSE-SDK-N${daystamp}*.zip | head -1 2>/dev/null`
|
2007-04-02 13:00:27 +00:00
|
|
|
echo "FILES=$FILES"
|
|
|
|
if [ "$FILES" != "" ]; then
|
2007-06-11 11:52:17 +00:00
|
|
|
rm N.latest/RSE-SDK-N*.zip 2>/dev/null
|
|
|
|
cd `dirname ${FILES}`
|
|
|
|
cp -f RSE-SDK-N*.zip ../N.latest/RSE-SDK-latest.zip
|
|
|
|
cp -f TM-discovery-*.zip ../N.latest/TM-discovery-latest.zip
|
|
|
|
cp -f RSE-remotecdt-*.zip ../N.latest/RSE-remotecdt-latest.zip
|
|
|
|
cd ../N.latest
|
|
|
|
chgrp dsdp-tmadmin *.zip
|
|
|
|
chmod g+w *.zip
|
2008-04-11 22:00:35 +00:00
|
|
|
if [ -d /shared/dsdp/public_html/tm/downloads/drops/N.latest ]; then
|
|
|
|
cp -f * /shared/dsdp/public_html/tm/downloads/drops/N.latest/
|
2008-04-11 22:51:23 +00:00
|
|
|
chmod -R g+w /shared/dsdp/public_html/tm/downloads/drops
|
2008-04-11 22:00:35 +00:00
|
|
|
fi
|
2007-04-02 13:00:27 +00:00
|
|
|
fi
|
2006-08-11 21:09:12 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#Cleanup old nightly builds (leave only last 5 in place)
|
2007-01-17 17:51:31 +00:00
|
|
|
cd $HOME/ws2/publish
|
2006-08-11 21:09:12 +00:00
|
|
|
ls -d N200* | sort | head -n-5 | xargs rm -rf
|
|
|
|
|