#! /bin/sh
#
# Author      : Olivier.Sirol@lip6.fr
# Date        : dec 1998
# Description : 
#
# (C) Czo 1998,99
# This code is released under GPL
# $Id: multibuild-s2,v 1.4 2000/01/27 17:40:00 czo Exp $
#


# I made this script to build alliance on multiple architectures
# Modify it to suit you site

# TODO : change this to a makefile...

#set +x
#set -x

TMPFILE=/tmp/albuild.$$

echo "loging onto each OS, cd sce-XXX, then run ./build"

cd ..
ALLIANCEDIR=`pwd`

for WKS in fox valse trash 

do
ssh $WKS "cd $ALLIANCEDIR/sce-\$MACHINE; ./build"  2>&1 | tee $TMPFILE
grep "###########       O K        #############" $TMPFILE
if [ $? -ne 0 ] ; then echo "Error, sce-$MACHINE, exiting" ; exit 4 ; fi

done

echo "done..."
echo "###########   O K pour tout le monde   #############"

