From 9ac486aef84592be3d84a8e0e2c501a526db3c86 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Fri, 29 Jul 2016 23:29:17 -0300 Subject: [PATCH] sch2fig/sch2pdf: add missing backtick; count properly --- sch2fig/sch2pdf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sch2fig/sch2pdf b/sch2fig/sch2pdf index fa72a2f..974f5c7 100755 --- a/sch2fig/sch2pdf +++ b/sch2fig/sch2pdf @@ -56,12 +56,11 @@ while [ "$2" ]; do shift done -./sch2fig "-DTITLE=`basename \"$1\" .sch" -DNUMBER=$num $template $libs "$1" | +./sch2fig "-DTITLE=`basename \"$1\" .sch`" -DNUMBER=$num $template $libs "$1" | fig2dev -L pdf >"$out" sheet=false while read line; do - num=`expr $num + 1` if ! $sheet; then [ "${line#\$Sheet}" != "$line" ] && sheet=true continue @@ -71,6 +70,7 @@ while read line; do continue fi fi + if [ "${line#F0 \"}" != "$line" ]; then name=${line#F0 \"} name=${name%%\"*} @@ -79,6 +79,8 @@ while read line; do file=${line#F1 \"} file=${file%%\"*} + num=`expr $num + 1` + $quiet || echo "$file" 1>&2 ./sch2fig "-DTITLE=$name" -DNUMBER=$num $template \ $libs `dirname "$1"`/$file |