Change Details
scripts/missing-in-tree |
2 | 2 | # |
3 | 3 | # missing-in-tree - List items present in libraries but not in the tree |
4 | 4 | # |
5 | | # Copyright 2012 by Werner Almesberger |
| 5 | # Copyright 2012, 2014 by Werner Almesberger |
6 | 6 | # |
7 | 7 | # This program is free software; you can redistribute it and/or modify |
8 | 8 | # it under the terms of the GNU General Public License as published by |
... | ... | |
14 | 14 | usage() |
15 | 15 | { |
16 | 16 | echo "usage: $0 [-F] [-L libdir ...] [-l lib ...] hierarchy" 1>&2 |
| 17 | echo " $0 -Q [-L libdir ...] [-l lib ...] project.pro" 1>&2 |
17 | 18 | exit 1 |
18 | 19 | } |
19 | 20 | |
... | ... | |
34 | 35 | } |
35 | 36 | |
36 | 37 | |
| 38 | scan_pro() |
| 39 | { |
| 40 | for n in `sed '/^LibName[0-9]*=\.\/\(.*\)/s//\1/p;d' $1`; do |
| 41 | sed '/^DEF ~\?/{s///;s/ .*//;p;};d' <$n.lib |
| 42 | done |
| 43 | } |
| 44 | |
37 | 45 | trap "rm -f _tmp1 _tmp2" 0 |
38 | 46 | |
39 | | genkicat -D "$@" >_tmp1 || exit |
| 47 | if [ "$1" = -Q ]; then |
| 48 | pro=true |
| 49 | shift |
| 50 | else |
| 51 | genkicat -D "$@" >_tmp1 || exit |
| 52 | pro=false |
| 53 | fi |
40 | 54 | |
41 | 55 | ext=lib |
42 | 56 | |
... | ... | |
67 | 81 | [ "$1" ] || usage |
68 | 82 | [ -z "$2" ] || usage |
69 | 83 | |
| 84 | if $pro; then |
| 85 | scan_pro "$1" >_tmp1 |
| 86 | fi |
| 87 | |
70 | 88 | cat _tmp1 _tmp1 _tmp2 | sort | uniq -u |
71 | 89 | |
72 | 90 | exit 0 |
Download the corresponding diff file