summaryrefslogtreecommitdiff
path: root/test/genpng
diff options
context:
space:
mode:
Diffstat (limited to 'test/genpng')
-rwxr-xr-xtest/genpng37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/genpng b/test/genpng
new file mode 100755
index 0000000..0d73ec1
--- /dev/null
+++ b/test/genpng
@@ -0,0 +1,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