po/pt_BR.po: correction of grammar.
[geda-pcb/pcjc2.git] / tools / Merge_dimPCBPS
blob84ce3ab28190fd53c3ce5100c95a0cb77641d013
1 #!/bin/sh
3 # merges PostScript files created by pcb (version >= 1.4.2) into
4 # a single file for backward compatibility
6 # Usage: name files...
8 # by Thomas Nau 9/96
11 if [ $# -eq 0 ]; then
12 echo "Usage: `basename $0` files..." >&2
13 exit 1
16 # some system need nawk
18 case `uname` in
19 SunOS) AWK=nawk;;
20 *) AWK=awk;;
21 esac
23 $AWK '
24 BEGIN { filecount = 0; }
25 /^%!PS/ { filecount++; if (filecount > 1) { print "Black"; } }
26 /^%!PS/,/^% PCBENDDATA/ {
27 if (filecount == 1)
29 if (index($0, "%%Title:") == 1)
30 sub(",.*$", ", merged layouts");
31 if (index($0, "Black") == 1)
32 sub ("Black", "0.9 mysetgray");
33 print $0;
34 next;
37 /^% PCBSTARTDATA/,/^% PCBENDDATA/ {
38 if (filecount > 1)
40 print $0;
41 next;
44 { next; }
45 END {
46 print "showpage";
47 print "%%EOF";
49 ' $@