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
|
|
|
|
##newgrp dsdp-tm-rse # newgrp doesnt work from shellscripts -- use sg instead
|
|
|
|
umask 2
|
|
|
|
|
|
|
|
#Use Java5 on build.eclipse.org
|
|
|
|
#export PATH=/shared/common/ibm-java2-ppc64-50/bin:$PATH
|
|
|
|
export PATH=/shared/webtools/apps/IBMJava2-ppc64-142/bin:$PATH
|
|
|
|
#export PATH=/shared/webtools/apps/IBMJava2-ppc-142/bin:$PATH
|
|
|
|
|
|
|
|
curdir=`pwd`
|
|
|
|
|
|
|
|
#Remove old logs and builds
|
|
|
|
echo "Removing old logs and builds..."
|
|
|
|
cd $HOME/ws
|
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'`
|
2006-08-24 08:32:25 +00:00
|
|
|
log=$HOME/ws/log-N$stamp.txt
|
2006-08-11 21:09:12 +00:00
|
|
|
sg dsdp-tm-rse -c "touch $log"
|
2006-08-17 21:56:34 +00:00
|
|
|
sg dsdp-tm-rse -c "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-08-11 21:09:12 +00:00
|
|
|
sg dsdp-tm-rse -c "./nightly.sh >> $log 2>&1"
|
|
|
|
tail -50 $log
|
|
|
|
|
|
|
|
#Fixup permissions and group id on download.eclpse.org (just to be safe)
|
|
|
|
chmod -R g+w $HOME/ws/publish/N${daystamp}*
|
|
|
|
|
|
|
|
#Copy latest SDK in order to give access to DOC server
|
|
|
|
cd $HOME/ws/publish
|
|
|
|
FILES=`ls N${daystamp}*/RSE-SDK-N${daystamp}*.zip 2>/dev/null`
|
|
|
|
echo "FILES=$FILES"
|
|
|
|
if [ "$FILES" != "" ]; then
|
|
|
|
rm N.latest/RSE-SDK-N*.zip
|
|
|
|
cp N${daystamp}*/RSE-SDK-N${daystamp}*.zip N.latest
|
|
|
|
cd N.latest
|
|
|
|
mv -f RSE-SDK-N${daystamp}*.zip RSE-SDK-latest.zip
|
|
|
|
fi
|
|
|
|
|
|
|
|
#Cleanup old nightly builds (leave only last 5 in place)
|
|
|
|
cd $HOME/ws/publish
|
|
|
|
ls -d N200* | sort | head -n-5 | xargs rm -rf
|
|
|
|
|