KiCad Libraries
Sign in or create your account | Project List | Help
KiCad Libraries Git Source Tree
Root/
Source at commit 1df00971ec537cb0417efbde9564b85120c861c2 created 11 years 11 months ago. By Adam Wang, diodes_inc.lib: AP21X2A -> changed to nRESET and FLG pins to inverted style. | |
---|---|
1 | #!/bin/sh -e |
2 | # |
3 | # missing-in-tree - List components present in libraries but not in the tree |
4 | # |
5 | # Copyright 2012 by Werner Almesberger |
6 | # |
7 | # This program is free software; you can redistribute it and/or modify |
8 | # it under the terms of the GNU General Public License as published by |
9 | # the Free Software Foundation; either version 2 of the License, or |
10 | # (at your option) any later version. |
11 | # |
12 | |
13 | |
14 | usage() |
15 | { |
16 | echo "usage: $0 [-L libdir ...] [-l lib ...] hierarchy" 1>&2 |
17 | exit 1 |
18 | } |
19 | |
20 | |
21 | scan_lib() |
22 | { |
23 | for n in "$@"; do |
24 | sed '/^DEF ~\?/{s///;s/ .*//;p;};d' <$n >>_tmp2 |
25 | done |
26 | } |
27 | |
28 | |
29 | trap "rm -f _tmp1 _tmp2" 0 |
30 | |
31 | genex -D "$@" >_tmp1 || exit |
32 | |
33 | >_tmp2 |
34 | while [ "$1" ]; do |
35 | case "$1" in |
36 | -L) shift |
37 | [ "`echo \"$1\"/*.lib`" = "$1/*.lib" ] || |
38 | scan_lib "$1"/*.lib;; |
39 | -l) shift |
40 | scan_lib "$1";; |
41 | -*) usage;; |
42 | *) break;; |
43 | esac |
44 | shift |
45 | done |
46 | |
47 | [ "$1" ] || usage |
48 | [ -z "$2" ] || usage |
49 | |
50 | cat _tmp1 _tmp1 _tmp2 | sort | uniq -u |
51 | |
52 | exit 0 |
53 |
Branches:
master