mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-16 20:54:40 +02:00
fpd2pdf/fpdoc: added option -a module to manually add modules
- fpdoc (usage, main): new option -a module to add modules - fpdoc: separated availability checking from mapping of component references to modules
This commit is contained in:
parent
47b53c8ef3
commit
e92f458b86
@ -14,11 +14,19 @@
|
|||||||
|
|
||||||
sub usage
|
sub usage
|
||||||
{
|
{
|
||||||
print STDERR "usage: $0 pro-file pdf-file\n";
|
print STDERR "usage: $0 [-a module ...] pro-file pdf-file\n\n";
|
||||||
|
print STDERR " -a module add the specified module\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
while ($ARGV[0] eq "-a") {
|
||||||
|
shift(@ARGV);
|
||||||
|
&usage unless @ARGV;
|
||||||
|
$need{shift @ARGV} = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
&usage if $ARGV[0] =~ /^-/;
|
||||||
&usage unless @ARGV == 2;
|
&usage unless @ARGV == 2;
|
||||||
|
|
||||||
$pro = $ARGV[0];
|
$pro = $ARGV[0];
|
||||||
@ -61,9 +69,11 @@ do "pos2fab" || die "pos2fab: $!";
|
|||||||
#
|
#
|
||||||
|
|
||||||
for (@order) {
|
for (@order) {
|
||||||
my $fp = $fp{$_};
|
$need{$fp{$_}} = 1;
|
||||||
die "don't have $fp" unless defined $fpd{$fp};
|
}
|
||||||
$need{$fp} = 1;
|
|
||||||
|
for (keys %need) {
|
||||||
|
die "don't have $_" unless defined $fpd{$_};
|
||||||
}
|
}
|
||||||
|
|
||||||
exec "fpd2pdf", "-o", $out, map { "$fpd{$_}:$_" } sort keys %need;
|
exec "fpd2pdf", "-o", $out, map { "$fpd{$_}:$_" } sort keys %need;
|
||||||
|
Loading…
Reference in New Issue
Block a user