KiCad Libraries
Sign in or create your account | Project List | Help
KiCad Libraries Git Source Tree
Root/
Source at commit dc5ce7a31aedb968753878e2cbaa857ffd79c5c8 created 10 years 10 days ago. By Werner Almesberger, components/aat1217.lib: Skyworks AAT1217 step-up converter | |
---|---|
1 | #!/bin/sh |
2 | # |
3 | # dcm2desc - Convert .dcm files to genex descriptions |
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 ...]" 1>&2 |
17 | exit 1 |
18 | } |
19 | |
20 | |
21 | scan_dcm() |
22 | { |
23 | for n in "$@"; do |
24 | sed -e '/^\$CMP /{s///;x;}' \ |
25 | -e '/^[DKF] /{s///;x;G;s/\n/: /;p;s/: .*//;x;}' \ |
26 | -e d <"$n" |
27 | done |
28 | } |
29 | |
30 | |
31 | while [ "$1" ]; do |
32 | case "$1" in |
33 | -L) shift |
34 | [ "`echo \"$1\"/*.dcm`" != "$1/*.dcm" ] && |
35 | scan_dcm "$1"/*.dcm;; |
36 | -l) shift |
37 | scan_dcm "$1";; |
38 | -*) usage;; |
39 | *) usage;; |
40 | esac |
41 | shift |
42 | done |
43 | |
44 | exit 0 |
45 |
Branches:
master