diff --git a/schhist/sanitize-profile b/schhist/sanitize-profile index 1ca3c59..5d1dd6d 100755 --- a/schhist/sanitize-profile +++ b/schhist/sanitize-profile @@ -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 () { $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;