IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Commit Details
Date: | 2010-08-28 00:32:52 (13 years 7 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | d7d95ff2da07c37cd95d5466d7cd2b775c771ec8 |
Message: | Allow schhist2web and friends to run from a directory outside the
working tree. - scripts/gitenealogy: now requires the repository directory to be passed - scripts/schhist2web: adapted for above change - scripts/schhist2web: change to the repository's directory before each call to git - scripts/Makefile: added demo upload and Xue build - scripts/Makefile (all): added usage information |
Files: |
scripts/Makefile (1 diff) scripts/gitenealogy (1 diff) scripts/schhist2web (4 diffs) |
Change Details
scripts/Makefile | ||
---|---|---|
1 | .PHONY: all ben-wpan-schhist | |
1 | SHELL = /bin/bash | |
2 | ||
3 | .PHONY: all ben-wpan-schhist xue-schhist | |
4 | ||
5 | # All the targets are for demo purposes pnly ! | |
2 | 6 | |
3 | 7 | all: |
8 | @echo "possible targets:" 2>&1 | |
9 | @echo " ben-wpan-schhist ben-wpan-schhist-upload" 2>&1 | |
10 | @echo " xue-schhist xue-schhist-upload" 2>&1 | |
11 | @exit 1 | |
4 | 12 | |
5 | 13 | ben-wpan-schhist: |
6 | 14 | SCHHIST_TITLE=ben-wpan/atrf \ |
7 | 15 | SCHHIST_HOME_URL=http://projects.qi-hardware.com/index.php/p/ben-wpan/ \ |
8 | 16 | SCHHIST_COMMIT_TEMPLATE='http://projects.qi-hardware.com/index.php/p/ben-wpan/source/commit/{}/' \ |
9 | 17 | ./schhist2web atrf/wpan-atrf.sch |
18 | ||
19 | ben-wpan-schhist-upload: | |
20 | rsync -a --progress _out/{index.html,unchanged.png,thum*,diff*} \ | |
21 | werner@host:/home/httpd/almesberger/misc/ben/demo/ | |
22 | ||
23 | xue-schhist: | |
24 | SCHHIST_TITLE=Xue \ | |
25 | SCHHIST_HOME_URL=http://projects.qi-hardware.com/index.php/p/xue/ \ | |
26 | SCHHIST_COMMIT_TEMPLATE='http://projects.qi-hardware.com/index.php/p/xue/source/commit/{}/' \ | |
27 | ./schhist2web ../../xue kicad/xue-rnc/xue-rnc.sch _xue | |
28 | ||
29 | xue-schhist-upload: | |
30 | rsync -a --progress _xue/{index.html,unchanged.png,thum*,diff*} \ | |
31 | werner@host:/home/httpd/almesberger/misc/ben/demo2/ |
scripts/gitenealogy | ||
---|---|---|
14 | 14 | |
15 | 15 | usage() |
16 | 16 | { |
17 | echo "usage: $0 path" 2>&1 | |
17 | cat <<EOF 2>&1 | |
18 | usage: $0 repo-dir path | |
19 | ||
20 | The file to trace must be at repo-dir/path | |
21 | EOF | |
18 | 22 | exit 1 |
19 | 23 | } |
20 | 24 | |
21 | 25 | |
22 | [ -z "$1" -o ! -z "$2" ] && usage | |
23 | [ ! -f "$1" ] && usage | |
26 | if [ -z "$2" -o ! -z "$3" ]; then | |
27 | usage | |
28 | fi | |
29 | ||
30 | if [ ! -d "$1" -o ! -d "$1/.git" ]; then | |
31 | echo "no git repository at $1" 1>&2 | |
32 | exit 1 | |
33 | fi | |
34 | if [ ! -f "$1/$2" ]; then | |
35 | echo "cannot find $2" 2>&1 | |
36 | exit 1 | |
37 | fi | |
24 | 38 | |
25 | git log --follow --name-status "$1" | | |
39 | cd "$1" || exit | |
40 | git log --follow --name-status "$2" | | |
26 | 41 | awk ' |
27 | 42 | /^commit /{ if (c) print c, n; c = $2 } |
28 | 43 | { if (NF) n = $(NF) } |
scripts/schhist2web | ||
---|---|---|
114 | 114 | [ -z "$1" ] || usage |
115 | 115 | |
116 | 116 | PATH=`dirname "$0"`:"$PATH" |
117 | first=`gitenealogy "$dir/$sch" | sed '$s/ .*//p;d'` | |
118 | schname=`gitenealogy "$dir/$sch" | sed '$s/^.* //p;d'` | |
117 | first=`gitenealogy "$dir" "$sch" | sed '$s/ .*//p;d'` | |
118 | schname=`gitenealogy "$dir" "$sch" | sed '$s/^.* //p;d'` | |
119 | 119 | |
120 | 120 | rm -rf "$out/diff_*" "$out/thumb_*" "$out/names" |
121 | 121 | $no_cache && rm -rf "$cache" |
... | ... | |
123 | 123 | mkdir -p "$cache" |
124 | 124 | |
125 | 125 | head= |
126 | for n in $first `git rev-list --reverse $first..HEAD`; do | |
127 | git show --pretty=format:'' --name-only $n | | |
126 | for n in $first `cd "$dir" && git rev-list --reverse $first..HEAD`; do | |
127 | ( cd "$dir" && git show --pretty=format:'' --name-only $n; ) | | |
128 | 128 | egrep -q '\.sch$|\.pro$|\.lib$' || continue |
129 | 129 | echo Processing $n |
130 | new=`gitenealogy "$dir/$sch" | sed "/^$n /s///p;d"` | |
130 | new=`gitenealogy "$dir" "$sch" | sed "/^$n /s///p;d"` | |
131 | 131 | if [ ! -z "$new" ]; then |
132 | 132 | echo Name change $schname to $new 1>&2 |
133 | 133 | schname="$new" |
... | ... | |
181 | 181 | } >"$index" |
182 | 182 | |
183 | 183 | next="$head" |
184 | for n in `git rev-list $first..HEAD~1` $first; do | |
184 | for n in `cd "$dir" && git rev-list $first..HEAD~1` $first; do | |
185 | 185 | [ -d "$cache/ppm_$n" ] || continue |
186 | 186 | empty=true |
187 | 187 | s="<TR><TR>" |
... | ... | |
229 | 229 | EOF |
230 | 230 | mkdir -p "$out/diff_$next" "$out/thumb_$next" |
231 | 231 | echo "<PRE>" |
232 | git log --pretty=short $next~1..$next | | |
232 | ( cd "$dir" && git log --pretty=short $next~1..$next; ) | | |
233 | 233 | if [ -z "$SCHHIST_COMMIT_TEMPLATE" ]; then |
234 | 234 | cat |
235 | 235 | else |