2006-08-11 21:09:12 +00:00
|
|
|
#!/bin/sh
|
2006-09-20 11:53:43 +00:00
|
|
|
#*******************************************************************************
|
2011-01-04 21:48:54 +00:00
|
|
|
# Copyright (c) 2006, 2011 Wind River Systems, Inc.
|
2006-09-20 11:53:43 +00:00
|
|
|
# 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
|
2010-12-23 18:31:33 +00:00
|
|
|
#export PATH=/shared/tools/tm/jdk-1.5/bin:$PATH
|
|
|
|
export PATH=/shared/tools/tm/jdk-1.5/jre/bin:/shared/tools/tm/jdk-1.5/bin:$PATH
|
2009-02-08 22:06:36 +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
|
|
|
|
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
|
2010-12-14 12:01:46 +00:00
|
|
|
|
|
|
|
echo "Updating builder from CVS..."
|
|
|
|
cd org.eclipse.tm.releng
|
|
|
|
cvs -q update -RPd >> $log 2>&1
|
|
|
|
cd ../org.eclipse.rse.build
|
2006-12-12 16:07:05 +00:00
|
|
|
cvs -q update -RPd >> $log 2>&1
|
2006-08-24 11:29:51 +00:00
|
|
|
|
|
|
|
echo "Running the builder..."
|
2010-12-14 12:01:46 +00:00
|
|
|
daystamp=`date +'%Y%m%d-%H'`
|
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
|
2010-12-23 18:31:33 +00:00
|
|
|
if [ -d /home/data/httpd/archive.eclipse.org/tm/downloads ]; then
|
|
|
|
cd /home/data/httpd/archive.eclipse.org/tm/downloads
|
2007-04-02 13:00:27 +00:00
|
|
|
cvs -q update -RPd >> $log 2>&1
|
2011-01-02 22:41:36 +00:00
|
|
|
chgrp tools.tm * CVS/* 2>/dev/null
|
2010-12-23 18:31:33 +00:00
|
|
|
cd /home/data/httpd/download.eclipse.org/tm/downloads
|
2007-04-02 13:00:27 +00:00
|
|
|
cvs -q update -RPd >> $log 2>&1
|
2011-01-02 22:41:36 +00:00
|
|
|
chgrp tools.tm * 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)
|
2011-01-02 22:41:36 +00:00
|
|
|
chgrp -R tools.tm drops/${buildType}*${daystamp}* 2>/dev/null
|
2007-06-11 12:02:56 +00:00
|
|
|
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
|
2010-11-29 10:10:57 +00:00
|
|
|
TERM=`ls TM-terminal-*.zip | grep -v local`
|
|
|
|
if [ x${TERM} != x ]; then
|
|
|
|
cp -f ${TERM} ../N.latest/TM-terminal-latest.zip
|
|
|
|
else
|
|
|
|
echo "ERROR: missing TM-terminal-*.zip"
|
|
|
|
fi
|
2007-06-11 11:52:17 +00:00
|
|
|
cd ../N.latest
|
2011-01-02 22:41:36 +00:00
|
|
|
chgrp tools.tm *.zip
|
2007-06-11 11:52:17 +00:00
|
|
|
chmod g+w *.zip
|
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
|
2010-05-03 22:03:08 +00:00
|
|
|
ls -d N201* | sort | head -n-5 | xargs rm -rf
|
2006-08-11 21:09:12 +00:00
|
|
|
|