KiCad Libraries
Sign in or create your account | Project List | Help
KiCad Libraries Git Source Tree
Root/
| 1 | #!/bin/sh -e |
| 2 | # |
| 3 | # modules-pro - Merge template and list of libraries to a profile |
| 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 template.pro module-basename ..." 1>&2 |
| 17 | exit 1 |
| 18 | } |
| 19 | |
| 20 | |
| 21 | scan_fped() |
| 22 | { |
| 23 | for n in "$@"; do |
| 24 | fped -k $n - | sed '/^\$MODULE /s///p;d' >>_tmp2 |
| 25 | done |
| 26 | } |
| 27 | |
| 28 | |
| 29 | [ -r "$1" ] || usage |
| 30 | sed /LibName1/Q "$1" |
| 31 | shift |
| 32 | |
| 33 | echo "$@" | tr ' ' '\012' | sort -f | awk '{ n++; print "LibName" n "=" $0 }' |
| 34 |
Branches:
master
