head	1.4;
access;
symbols
	charm6_1:1.4
	charm_6_0_1:1.4
	charm6_0_1:1.4
	charm6_0:1.4
	ChaNGa_1-0:1.4
	charm5_9:1.4;
locks; strict;
comment	@# @;


1.4
date	2005.01.23.04.11.14;	author gzheng;	state Exp;
branches;
next	1.3;

1.3
date	2004.09.04.05.05.46;	author gioachin;	state Exp;
branches;
next	1.2;

1.2
date	2004.09.04.04.37.17;	author gioachin;	state Exp;
branches;
next	1.1;

1.1
date	2003.02.21.19.03.16;	author olawlor;	state Exp;
branches;
next	;


desc
@@


1.4
log
@fixed
@
text
@#!/bin/sh
#
# Prepare the autobuild website for a new run.
# This script is called by autobuild during startup.
# Orion Sky Lawlor, olawlor@@acm.org, 2002/2/3
#

source config

# Exit giving this reason for failure.
Die() {
	echo "web fatal> " $@@ 
	exit 1
}

# Run this command or die
Do() {
	echo "web> " $@@
	$@@ 
	err="$?"
	if [ $err -ne 0 ] 
	then
		Die "error code $err during web> " $@@ 
	fi
}

rm -fr web/*

newDir="old."`date +"%Y_%m_%d__%H_%M"`
echo "update_web_start> Making web directory at $newDir"
Do ssh $webMachine << END_REMOTE
cd $webMachPath
#rm -fr bin/*
#(cd bin && ln -s charm_src.tar.gz charm.tar.gz)
rm -f prev
mv -f cur prev
mkdir $newDir
ln -s $newDir cur
#notUpdated=`find bin -not -ctime -14`
#if [ -n "\$notUpdated" ]; then
#  emailText="Hey guys, the following files have not been updated for 2 weeks. Is it time to check why it is not working?\n\n\$notUpdated"
#  echo -e \$emailText | mail -s "Charm++ Autobuild continuously failing" $mailRecip
#fi
cd cur
cat > index.html << END_HTML
<html>
<title>Charm++ Automated-Build Status</title>
<body bgcolor="#ffFFff">
<h1>Charm++ Automated-Build Starting...</h1>
Charm++ automated build started on `date`<br>
No compilations have finished yet.<br>
Return to <a href="/">Charm++ Home Page</a>
</BODY></HTML>
END_HTML

END_REMOTE

@


1.3
log
@email is sent when autobuild fails for more than 2 weeks
@
text
@d35 2
a36 2
rm prev
mv cur prev
d39 5
a43 5
notUpdated=`find bin -not -ctime -14`
if [ -n "\$notUpdated" ]; then
  emailText="Hey guys, the following files have not been updated for 2 weeks. Is it time to check why it is not working?\n\n\$notUpdated"
  echo -e \$emailText | mail -s "Charm++ Autobuild continuously failing" $mailRecip
fi
@


1.2
log
@the bin directory is not deleted, and will keep the last distribution
@
text
@d39 5
@


1.1
log
@Re-wrote this automated build system, after a hard drive crash
destroyed the 2002 version.  Since I don't want to lose everything
again, I'm checking this one in.
@
text
@d33 2
a34 2
rm -fr bin/*
(cd bin && ln -s charm_src.tar.gz charm.tar.gz)
@

