1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-27 06:26:15 +02:00
eda-tools/sch2fig/test/genpng
2016-07-26 08:28:39 -03:00

33 lines
524 B
Bash
Executable File

#!/bin/sh
usage()
{
echo "usage: $0 [[dir] prefix]" 1>&2
exit 1
}
[ "$3" ] && usage
[ "${1#-}" != "$1" ] && usage
dir=.
if [ "$2" ]; then
dir=$1
shift
fi
prefix=${1:-out}
sheet=1
while [ $sheet -le 37 ]; do
echo -n .
sn=`printf '%02d' $sheet`
file=$dir/$prefix$sn.png
$dir/../sch2fig -DSHEET=$sn -t $dir/frame.fig \
$dir/neo900-ee/hw/neo900.lib \
$dir/kicad-libs/components/powered.lib \
$dir/neo900-ee/hw/neo900_SS_$sheet.sch |
fig2dev -L png -m 2 >$file
sheet=`expr $sheet + 1`
done
echo