head	1.8;
access;
symbols
	CDT_GA_1_1_0_20030516:1.8
	cdt_1_1:1.8.0.4
	Root_cdt_1_1:1.8
	cdt_1_0_1:1.8.0.2
	Root_cdt_1_0_1:1.8
	b:1.1.1.1
	a:1.1.1;
locks; strict;
comment	@# @;


1.8
date	2002.06.05.11.35.27;	author turnham;	state Exp;
branches;
next	1.7;

1.7
date	2002.06.04.01.07.03;	author turnham;	state Exp;
branches;
next	1.6;

1.6
date	2002.06.02.17.43.59;	author turnham;	state Exp;
branches;
next	1.5;

1.5
date	2002.05.31.13.30.31;	author turnham;	state Exp;
branches;
next	1.4;

1.4
date	2002.05.31.13.18.33;	author turnham;	state Exp;
branches;
next	1.3;

1.3
date	2002.05.30.22.02.56;	author turnham;	state Exp;
branches;
next	1.2;

1.2
date	2002.05.30.21.04.44;	author turnham;	state Exp;
branches;
next	1.1;

1.1
date	2002.05.30.20.50.27;	author turnham;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2002.06.06.17.35.19;	author turnham;	state Exp;
branches;
next	;


desc
@@


1.8
log
@Automated Update
@
text
@#! /bin/sh
#This is the cron job that updates our download page.  It currently runs on machine turnham
#at 5:00 a.m.

#Path to the cdt-home
rootDir=/home/turnham/cdtweb
#Change the next 2 lines when we change the build that CDT is being built with
eclipseVersion=F2
eclipseLink=http://download.eclipse.org/downloads/drops/S-F2-200206020843/index.php
netrc=$HOME/.netrc
theDate=`date +%Y%m%d`
theDate2=`date +%Y/%m/%d`

#Goto the CVS downloads directory and do a CVS update (so that the subsequent commit won't complain)
cd $rootDir/cdt-home/downloads
cvs update

#Remove any existing .zip files or errors file
rm -f *.zip
rm -f errors

#Get the Errors File and the driver from goose
rm $netrc
touch $netrc
chmod 600 $netrc
echo "machine goose login anonymous password turnham@@ca.ibm.com" >>$netrc
echo "macdef init" >>$netrc
echo "image" >>$netrc
echo "prompt" >>$netrc
echo "cd pub/$eclipseVersion/latest" >>$netrc
echo "get errors" >>$netrc
echo "bin" >>$netrc
echo "mget cdt-eclipse-R2-$theDate.zip" >>$netrc
echo "bye" >>$netrc
echo "close" >>$netrc
echo "" >>$netrc
ftp goose
rm $netrc

#Send mail if errors file is large, also set the status to PASS or FAIL and update mainLatestNightly.html if the build was successful
theSize=`ls -l errors | awk '{print $5}'`
if [ $theSize -gt 910 ] ;
 then
  theStatus=FAIL
  cat $rootDir/cdt-home/downloads/ErrorsMessage.txt errors | mail -s "POSSIBLE ERRORS IN CDT NIGHTLY BUILD" turnham@@ca.ibm.com weisz@@ca.ibm.com chanskw@@ca.ibm.com dmcknigh@@ca.ibm.com
 else
  theStatus=PASS
  mln=mainLatestNightly.html
  echo "<tr>" > $mln
  echo "<td><a href=\"http://download.eclipse.org/eclipse/downloads/build_types.html\">Nightly</a></td>" >> $mln
  echo "<td>$theDate2</td>" >> $mln
  echo "<td><a href=\"$eclipseLink\">$eclipseVersion</a></td>" >> $mln
  echo "<td><a href=\"http://download.eclipse.org/tools/cdt/downloads/nightly/$theDate/cdt-eclipse-R2-$theDate.zip\">cdt-eclipse-R2-$theDate.zip</a></td>" >> $mln
  echo "</tr>" >> $mln
fi

#Add the nightly build to mainNightly.html
mn=mainNightly.new
echo "<tr>" >> $mn
echo "<td>$theDate2</td>" >> $mn
echo "<td><a href=\"http://download.eclipse.org/tools/cdt/downloads/nightly/$theDate/errors\">Error Log</a>" >> $mn
echo " <img alt=\"\" src=\"http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/cdt-home/downloads/$theStatus.gif?cvsroot=Tools_Project\"></td>" >> $mn
echo "<td><a href=\"$eclipseLink\">$eclipseVersion</a></td>" >> $mn
echo "<td><a href=\"http://download.eclipse.org/tools/cdt/downloads/nightly/$theDate/cdt-eclipse-R2-$theDate.zip\">cdt-eclipse-R2-$theDate.zip</a></td>" >> $mn
echo "</tr>" >> $mn
mv mainNightly.html mainNightly.old
cat $mn mainNightly.old > mainNightly.html
rm -f $mn


#Now just put the pieces together
cat mainTop.html            > main.html
cat mainLatestNightly.html >> main.html
cat mainRelease.html       >> main.html
cat mainStable.html        >> main.html
cat mainNightly.html       >> main.html

#ftp the zip and error file over to the download site

#What you thought I would put my password in this file? ;-)
ftpPassword=`cat ftpPassword`

touch $netrc
chmod 600 $netrc
echo "machine download.eclipse.org login turnham password $ftpPassword" >>$netrc
echo "macdef init" >>$netrc
echo "image" >>$netrc
echo "prompt" >>$netrc
echo "cd nightly" >>$netrc
echo "mkdir $theDate" >>$netrc
echo "cd $theDate" >>$netrc
echo "put cdt-eclipse-R2-$theDate.zip" >>$netrc 
echo "put errors"  >>$netrc
echo "bye" >>$netrc 
echo "close" >>$netrc
echo "" >>$netrc
ftp download.eclipse.org
rm $netrc
rm errors
rm cdt-eclipse-R2-$theDate.zip

#Commit changes
cvs commit -m 'Automated update' main.html mainNightly.html mainLatestNightly.html
echo "All done"
echo `date`
@


1.7
log
@Updated for R2
@
text
@d42 1
a42 1
if [ $theSize -gt 900 ] ;
@


1.6
log
@*** empty log message ***
@
text
@d8 2
a9 2
eclipseVersion=F1
eclipseLink=http://download.eclipse.org/downloads/drops/S-F1-200205211339/index.php
d104 2
a105 6






@


1.5
log
@small fix
@
text
@d103 3
a105 1
cvs commit -m 'Automated update'
@


1.4
log
@fixed some minor problems
@
text
@d103 5
a107 1
cvs commit -m "Automated update"
@


1.3
log
@Many fixes
@
text
@d12 1
d51 1
a51 1
  echo "<td>" `date +%Y/%m/%d` "</td>" >> $mln
d58 1
a58 1
mn=mainNightly.html
d60 1
a60 1
echo "<td>" `date +%Y/%m%d` "</td>" >> $mn
d66 4
@


1.2
log
@updated
@
text
@d48 6
a53 8
  echo "<tr>" > mln
  echo "<td><a href=\"http://download.eclipse.org/eclipse/downloads/build_types.html\">Nightly</a></td>" >> mln
  echo `date +%Y/%m/%d` >> mln
  echo "  <td><a href=\"$eclipseLink\">$eclipseVersion</a>" >> mln
  echo "  </td>" >> mln
  echo " <td><a href=\"http://download.eclipse.org/tools/cdt/downloads/nightly/$theDate/cdt-eclipse-R2-$theDate.zip\">cdt-eclipse-R2-$theDate.zip</a>" >> mln
  echo " </td>" >> mln
  echo "</tr>" >> mln
d56 10
d71 1
a71 8
cat mainNightly.hmtl       >> main.html

cat nightlyBuilds >> nb
mv nb nightlyBuilds 
mv nightly.html nightly.html.old
cat nightlyTop     > nightly.html
cat nightlyBuilds >> nightly.html
cat nightlyBottom >> nightly.html
d98 1
a98 1
#cvs commit -m "Automated update"
@


1.1
log
@create
@
text
@d39 1
a39 1
#Send mail if errors file is large, also set the status to PASS or FAIL and update mainLatestNightly.html
d41 1
a41 1
if [ $theSize -gt 900 ] 
d45 1
a45 1
 elif
d51 5
a55 6
  echo "<td><a href=\"$eclipseVhttp://download.eclipse.org/downloads/drops/S-F1-200205211339/index.php">F1</a></td>
  <td><a href="http://download.eclipse.org/tools/cdt/downloads/nightly/20020530/cdt-eclipse-R2-20020530.zip">
   cdt-eclipse-R2-20020530.zip</a>
  </td>
 </tr>

d58 6
a63 24
#Update Create nightly.html (nb = newbuild)
echo "<tr align=center>" > nb
echo "<td>$theDate</td>" >> nb
echo "<td>" >> nbD
<tr>
  <td><a href="http://download.eclipse.org/eclipse/downloads/build_types.html">Nightly</a></td>
  <td>2002/05/30</td>
  <td><a href="http://download.eclipse.org/downloads/drops/S-F1-200205211339/index.php">F1</a></td>
  <td><a href="http://download.eclipse.org/tools/cdt/downloads/nightly/20020530/cdt-eclipse-R2-20020530.zip">
   cdt-eclipse-R2-20020530.zip</a>
  </td>
 </tr>


echo " <a href=\"http://download.eclipse.org/tools/cdt/downloads/nightly/$theDate/errors\">Error Log</a>" >> nb
echo " <img src=\"http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/cdt-home/downloads/$theStatus.gif?cvsroot=Tools_Project\">" >> nb
echo "</td>" >> nb
echo "<td>" >> nb
echo " <a href=\"$eclipseLink\">$eclipseVersion</a>" >> nb
echo "</td>" >> nb
echo "<td>" >> nb
echo " <a href=\"http://download.eclipse.org/tools/cdt/downloads/nightly/$theDate/cdt-eclipse-R2-$theDate.zip\">cdt-eclipse-R2-$theDate.zip</a>" >> nb
echo "</td>" >> nb
echo "</tr>" >> nb
d97 1
a97 1
cvs commit -m "Automated update"
@


1.1.1.1
log
@This is a test
@
text
@d8 2
a9 2
eclipseVersion=F2
eclipseLink=http://download.eclipse.org/downloads/drops/S-F2-200206020843/index.php
a11 1
theDate2=`date +%Y/%m/%d`
d39 1
a39 1
#Send mail if errors file is large, also set the status to PASS or FAIL and update mainLatestNightly.html if the build was successful
d41 1
a41 1
if [ $theSize -gt 910 ] ;
d45 1
a45 1
 else
d48 9
a56 6
  echo "<tr>" > $mln
  echo "<td><a href=\"http://download.eclipse.org/eclipse/downloads/build_types.html\">Nightly</a></td>" >> $mln
  echo "<td>$theDate2</td>" >> $mln
  echo "<td><a href=\"$eclipseLink\">$eclipseVersion</a></td>" >> $mln
  echo "<td><a href=\"http://download.eclipse.org/tools/cdt/downloads/nightly/$theDate/cdt-eclipse-R2-$theDate.zip\">cdt-eclipse-R2-$theDate.zip</a></td>" >> $mln
  echo "</tr>" >> $mln
d59 31
a89 20
#Add the nightly build to mainNightly.html
mn=mainNightly.new
echo "<tr>" >> $mn
echo "<td>$theDate2</td>" >> $mn
echo "<td><a href=\"http://download.eclipse.org/tools/cdt/downloads/nightly/$theDate/errors\">Error Log</a>" >> $mn
echo " <img alt=\"\" src=\"http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/cdt-home/downloads/$theStatus.gif?cvsroot=Tools_Project\"></td>" >> $mn
echo "<td><a href=\"$eclipseLink\">$eclipseVersion</a></td>" >> $mn
echo "<td><a href=\"http://download.eclipse.org/tools/cdt/downloads/nightly/$theDate/cdt-eclipse-R2-$theDate.zip\">cdt-eclipse-R2-$theDate.zip</a></td>" >> $mn
echo "</tr>" >> $mn
mv mainNightly.html mainNightly.old
cat $mn mainNightly.old > mainNightly.html
rm -f $mn


#Now just put the pieces together
cat mainTop.html            > main.html
cat mainLatestNightly.html >> main.html
cat mainRelease.html       >> main.html
cat mainStable.html        >> main.html
cat mainNightly.html       >> main.html
d116 1
a116 3
cvs commit -m 'Automated update' main.html mainNightly.html mainLatestNightly.html
echo "All done"
echo `date`
@


