#!/bin/csh -f
if ( "$1" == "" ) then
  echo "Create a Cheops input file from an Alliance description"
  echo "usage : `basename $0` chip"
  exit 1
endif
setenv MBK_IN_PH  ap
setenv MBK_OUT_PH cp
setenv MBK_IN_LO  vst
setenv MBK_OUT_LO hns
frin $1
if ($status != 0) exit 1;
set core=`grep ^I $MBK_WORK_LIB/$1.cp | tail -1 | /usr/bin/awk -F\" '{print $2}'`
vticheops << EOT
$core



EOT
x2y cp ap $1
rm $1.cp
