#!/bin/sh
# cct
#
# Simple script to convert m4 figures into .cct files for inclusion in
# LaTeX documents via \inputcct.
#
# Called as cct fig or cct fig.m4 or cct *.m4
#
# Last updated 22/4/99 Alan Robert Clark a.clark@ee.wits.ac.za
for i do
  filpath=`dirname $i`
  fn=$filpath/`basename $i .m4`
  if [ -e $fn.m4 ]
    then
      echo "Processing $fn"
      m4 $fn.m4 | gpic -t > $fn.cct
    else
      echo "cct: $fn.m4 not found!"
  fi
done
