IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Commit Details
Date: | 2010-08-27 19:31:05 (13 years 7 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | a241265aaf21f6e1989618272105c2b7c9321ce7 |
Message: | Run eeschema only once (not twice) per commit. 20% speed improvement. - scripts/gitsch2ppm: new option -k to keep checked-out tree - scripts/gitsch2ppm: new option -c to reuse Postscript files from -k run - scripts/gitsch2ppm: removed C-style use of "break" from "case" - scripts/schhist2web: use gitsch2ppm -k and -c to half number of eeschema runs |
Files: |
scripts/gitsch2ppm (3 diffs) scripts/schhist2web (1 diff) |
Change Details
scripts/gitsch2ppm | ||
---|---|---|
40 | 40 | cat <<EOF 1>&2 |
41 | 41 | usage: $0 [options] top-dir top-schem [commit] outdir |
42 | 42 | |
43 | -c use cached Postscript files (from previous run, with -k) | |
44 | -k keep checked-out tree (for immediate reuse with -c) | |
43 | 45 | -r XxY image resolution (default: $RES) |
44 | 46 | -w points Postscript line width (default: $LINEWIDTH) |
45 | 47 | EOF |
... | ... | |
47 | 49 | } |
48 | 50 | |
49 | 51 | |
52 | cache=false | |
53 | keep=false | |
50 | 54 | while true; do |
51 | 55 | case "$1" in |
56 | -c) cache=true | |
57 | shift;; | |
58 | -k) keep=true | |
59 | shift;; | |
52 | 60 | -r) [ -z "$2" ] && usage |
53 | 61 | RES="$2" |
54 | shift 2 | |
55 | break;; | |
62 | shift 2;; | |
56 | 63 | -w) [ -z "$2" ] && usage |
57 | 64 | LINEWIDTH="$2" |
58 | shift 2 | |
59 | break;; | |
65 | shift 2;; | |
60 | 66 | -*) |
61 | 67 | usage;; |
62 | 68 | *) |
... | ... | |
84 | 90 | tmp="$dir/../_gitsch2ppm" |
85 | 91 | sch="$tmp/$sdir" |
86 | 92 | |
87 | rm -rf "$tmp" | |
93 | if ! $cache; then | |
94 | rm -rf "$tmp" | |
95 | rm -rf "$outdir" | |
88 | 96 | |
89 | git clone -s -n "$dir/.git" "$tmp" || exit | |
90 | ( cd "$tmp" && git checkout -q "$commit"; ) || exit | |
97 | git clone -s -n "$dir/.git" "$tmp" || exit | |
98 | ( cd "$tmp" && git checkout -q "$commit"; ) || exit | |
91 | 99 | |
92 | if [ ! -f "$tmp/$schem" ]; then | |
93 | echo "$schem not found (checked out into $tmp)" 1>&2 | |
94 | exit 1 | |
95 | fi | |
100 | if [ ! -f "$tmp/$schem" ]; then | |
101 | echo "$schem not found (checked out into $tmp)" 1>&2 | |
102 | exit 1 | |
103 | fi | |
96 | 104 | |
97 | ( cd "$sch" && rm -f *.ps *.ppm && eeschema --plot "$tmp/$schem"; ) || exit | |
105 | ( cd "$sch" && rm -f *.ps *.ppm && eeschema --plot "$tmp/$schem"; ) || exit | |
106 | fi | |
98 | 107 | |
99 | 108 | for n in "$sch"/*.ps; do |
100 | 109 | ps2ppm "$n" |
101 | 110 | done |
102 | 111 | |
103 | rm -rf "$outdir" | |
104 | 112 | mkdir -p "$outdir" |
105 | 113 | |
106 | 114 | mv "$sch"/*.ppm "$outdir" |
107 | 115 | |
108 | rm -rf "$tmp" | |
116 | $keep || rm -rf "$tmp" |
scripts/schhist2web | ||
---|---|---|
136 | 136 | if [ ! -d "$cache/ppm_$n" ]; then |
137 | 137 | rm -rf "$cache/ppm_$n" |
138 | 138 | mkdir "$cache/ppm_$n" |
139 | gitsch2ppm "$dir" "$schname" $n "$cache/ppm_$n" || exit | |
140 | gitsch2ppm -w 500 "$dir" "$schname" $n "$cache/fat_$n" || exit | |
139 | gitsch2ppm -k "$dir" "$schname" $n "$cache/ppm_$n" || exit | |
140 | gitsch2ppm -c -w 500 "$dir" "$schname" $n "$cache/fat_$n" || exit | |
141 | 141 | fi |
142 | 142 | for m in "$cache/ppm_$n/"*; do |
143 | 143 | [ "$m" = "$cache/ppm_$n/*" ] && break |