/usr/share/pcb/tools/Merge_dimPCBPS is in pcb-common 20110918-7.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #!/bin/sh
#
# $Id$
#
# merges PostScript files created by pcb (version >= 1.4.2) into
# a single file for backward compatibility
#
# Usage: name files...
#
# by Thomas Nau 9/96
#
if [ $# -eq 0 ]; then
echo "Usage: `basename $0` files..." >&2
exit 1
fi
# some system need nawk
#
case `uname` in
SunOS) AWK=nawk;;
*) AWK=awk;;
esac
$AWK '
BEGIN { filecount = 0; }
/^%!PS/ { filecount++; if (filecount > 1) { print "Black"; } }
/^%!PS/,/^% PCBENDDATA/ {
if (filecount == 1)
{
if (index($0, "%%Title:") == 1)
sub(",.*$", ", merged layouts");
if (index($0, "Black") == 1)
sub ("Black", "0.9 mysetgray");
print $0;
next;
}
}
/^% PCBSTARTDATA/,/^% PCBENDDATA/ {
if (filecount > 1)
{
print $0;
next;
}
}
{ next; }
END {
print "showpage";
print "%%EOF";
}
' $@
|