mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-27 01:59:42 +02:00
sch2fig/sch2pdf: pass sheet number in <NUMBER>; option -n num to set start
This commit is contained in:
parent
8903dd8db7
commit
22bdd42188
@ -22,7 +22,8 @@
|
||||
usage()
|
||||
{
|
||||
cat <<EOF 1>&2
|
||||
usage: $0 [-o output.pdf] [-q] [-t template.fig ] file.lib ... file.sch
|
||||
usage: $0 [-n first_num] [-o output.pdf] [-q] [-t template.fig ]
|
||||
file.lib ... file.sch
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
@ -31,8 +32,11 @@ EOF
|
||||
out=out.pdf
|
||||
quiet=false
|
||||
template=
|
||||
num=1
|
||||
while [ "$1" ]; do
|
||||
case "$1" in
|
||||
-n) num=$2
|
||||
shift 2;;
|
||||
-o) out=$2
|
||||
shift 2;;
|
||||
-q) quiet=true
|
||||
@ -73,7 +77,8 @@ while read line; do
|
||||
file=${file%%\"*}
|
||||
|
||||
$quiet || echo "$file" 1>&2
|
||||
./sch2fig "-DTITLE=$name" $template $libs `dirname "$1"`/$file |
|
||||
./sch2fig "-DTITLE=$name" -DNUMBER=$num $template \
|
||||
$libs `dirname "$1"`/$file |
|
||||
fig2dev -L pdf >_tmp.pdf
|
||||
if $first; then
|
||||
mv _tmp.pdf "$out"
|
||||
@ -82,5 +87,6 @@ while read line; do
|
||||
pdfunite "$out" _tmp.pdf _tmp2.pdf
|
||||
mv _tmp2.pdf "$out"
|
||||
fi
|
||||
num=`expr $num + 1`
|
||||
done <"$1"
|
||||
exit
|
||||
|
Loading…
Reference in New Issue
Block a user