#!/bin/csh
set EXE=`basename $0`
if ($2 == "") then
  echo "Usage: $EXE file.lus node <options>"
  exit
endif
set name=`basename $1 .lus`
set node=$2
shift
shift
lustre ${name}.lus $node -oc2 -pure -S4 -causal
if( $status != 0) then
  exit 
endif
/bin/rm -f $node.ec
ocmin $node.oc -v
/bin/mv -f ${node}_min.oc $node.oc
oc2atg $node.oc -o $node $*
set ok=$status
/bin/rm -f $node.oc
if ( $ok != "0" ) then 
	echo "Ca a foiré..."
else
	echo Fichier $node.atg créé.
endif
