summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/runm4
blob: 93eba9300b8870512a378cf553a456d781a4e4b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash 
#
# $Id: runm4,v 1.4 2006/08/16 21:15:49 frank Exp $
#
#set -x

if test $? = 1
then 
 echo "WRONG number of args!"
 exit 1
fi

# try gpic or pic (on SUSE it is pic)

PIC=`type -a gpic 2> /dev/null | head -1 |awk '{print $3}'`
if test "$PIC" = "" ; then PIC=pic ; fi

F=`basename $1 .m4`

if test -r $F.eps
then
 echo $F.eps already made
else
 m4 circuit/libcct.m4 $F.m4 | $PIC -t  > $F.ltx
  echo $F: M4 and $PIC done now run LaTeX
 ./runltx $F.ltx
fi