summaryrefslogtreecommitdiff
path: root/test/genpng
blob: 0d73ec1984a37d1fa5ef43193fcb063279564e99 (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
28
29
30
31
32
33
34
35
36
37
#!/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 38 ]; do
	echo -n .
	sn=`printf '%02d' $sheet`
	file=$dir/$prefix$sn.png
	if [ $sheet = 1 ]; then
		in=$dir/neo900-ee/hw/neo900.sch
	else
		in=$dir/neo900-ee/hw/neo900_SS_`expr $sheet - 1`.sch
	fi
	file=$dir/$prefix$sn.png
	$dir/../eeshow $dir/neo900-ee/hw/neo900.lib \
	    $dir/kicad-libs/components/powered.lib "$in" \
	    -- fig -t $dir/frame.fig SHEET=$sn |
	    fig2dev -L png -m 2 >$file
	sheet=`expr $sheet + 1`
done
echo