#!/bin/sh
#
# objet : ramène la notice d'un opérateur
#         
# syntaxe : cinfo nom_doperateur
#
# debugging : set -x
#set -x
# Début du script
# Fonctions
if [ $# != 1 ] ;  then 
   echo "Utilisation : $0 nom_doperateur castem..." >&2 
   echo "Objet :  ramène la notice d'un opérateur CASTEM 2000" >&2
   exit 1
fi
#  archi=`uname`
#  if [ $archi = 'Linux' ]
#  then 
#      makeprog=/usr/bin/make
#  else 
#      if [ $archi = 'AIX' ]
#      then 
#          makeprog=/u2/gounand/bin/make
#      else 
#          makeprog=make
#      fi
#  fi
cd /tmp
mkdir tutu$$
cd tutu$$
#ln -sf /u2/gounand/makefile_for_castem/Makefile .
#make testdgibi > /dev/null
#/u2/gounand/bin/make testdgibi 
echo "'INFO' $1 ;" > toto$$.dgibi
echo "'FIN' ;" >> toto$$.dgibi
#cat toto$$.dgibi
#./testdgibi toto$$.dgibi 
castem toto$$.dgibi > toto$$.txt 2>&1
#./testdgibi toto$$.dgibi > toto$$.txt 2&>1
awk "/'INFO'/,/'FIN'/" toto$$.txt
#ndebu=`grep -n "'INFO'" toto$$.txt |cut -f 1 -d :`
#nfin=`grep -n "'FIN'" toto.txt |cut -f 1 -d :`
#echo $ndebu
#echo $nfin
#rm -f toto$$.dgibi Makefile testdgibi toto$$.txt 
cd ..
rm -fr tutu$$


