1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-25 21:55:20 +02:00

schhist/sanitize-profile: treat LibDir as a list

This commit is contained in:
Werner Almesberger 2012-05-11 00:53:05 -03:00
parent 881bf33be0
commit 9365a23f7c

View File

@ -2,8 +2,8 @@
#
# sanitize-profile - Remove items from a KiCad profile that may cause an upset
#
# Written 2010 by Werner Almesberger
# Copyright 2010 Werner Almesberger
# Written 2010, 2012 by Werner Almesberger
# Copyright 2010, 2012 Werner Almesberger
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -34,7 +34,7 @@ sub rewrite
if ($lib =~ /\//) {
return "$var=$lib\n" if -r "$lib.lib";
}
for (".", $libdir, @LIBS) {
for (".", @libdir, @LIBS) {
return "$var=$lib\n" if -r "$_/$lib.lib";
}
print STDERR "cannot find $lib\n";
@ -83,7 +83,7 @@ while (<FILE>) {
$section = $1;
}
if ($section eq "eeschema") {
$libdir = $1 if /^LibDir=(.*)\s*$/;
@libdir = split(/;/, $1) if /^LibDir=(.*)\s*$/;
}
$s = &rewrite($_);
push(@f, $s) if defined $s;