OLD | NEW |
1 #!/bin/bash -x | 1 #!/bin/bash -x |
2 # | 2 # |
3 # go.sh [--cached] [systems] | 3 # go.sh [systems] |
4 # | 4 # |
5 # Convenience script to generate systems. Do not call from build steps or tests | 5 # Convenience script to generate systems. Do not call from build steps or tests |
6 # - call fremontcutbuilder and dartdomgenerator instead. Do not add 'real' | 6 # - call fremontcutbuilder and dartdomgenerator instead. Do not add 'real' |
7 # functionality here - change the python code instead. | 7 # functionality here - change the python code instead. |
8 # | 8 # |
9 # I find it essential to generate all the systems so I know if I am breaking | 9 # I find it essential to generate all the systems so I know if I am breaking |
10 # other systems. My habit is to run: | 10 # other systems. My habit is to run: |
11 # | 11 # |
12 # ./go.sh | tee Q | 12 # ./go.sh | tee Q |
13 # | 13 # |
14 # I can inspect file Q if needed. | 14 # I can inspect file Q if needed. |
15 # | 15 # |
16 # If I know the IDL has not changed since the last run, it is faster to run | |
17 # | |
18 # ./go.sh --cached | |
19 # | |
20 # To generate a subset of systems: | 16 # To generate a subset of systems: |
21 # | 17 # |
22 # ./go.sh dart2js,htmldart2js | 18 # ./go.sh dart2js,htmldart2js |
23 # | 19 # |
24 # The following gives a picture of the changes due to 'work' | 20 # The following gives a picture of the changes due to 'work' |
25 # | 21 # |
26 # git checkout master # select client without changes | 22 # git checkout master # select client without changes |
27 # ./go.sh | 23 # ./go.sh |
28 # mv ../generated ../generated0 # save generated files | 24 # mv ../generated ../generated0 # save generated files |
29 # git checkout work # select client with changes | 25 # git checkout work # select client with changes |
30 # ./go.sh | 26 # ./go.sh |
31 # meld ../generated0 ../generated # compare directories with too | 27 # meld ../generated0 ../generated # compare directories with too |
32 | 28 |
33 CACHED= | |
34 if [[ "$1" == "--cached" ]] ; then | |
35 CACHED=1 | |
36 shift | |
37 fi | |
38 | |
39 ALLSYSTEMS="htmldart2js,htmldartium" | 29 ALLSYSTEMS="htmldart2js,htmldartium" |
40 SYSTEMS="$ALLSYSTEMS" | 30 SYSTEMS="$ALLSYSTEMS" |
41 | 31 |
42 if [[ "$1" != "" ]] ; then | 32 if [[ "$1" != "" ]] ; then |
43 SYSTEMS="$1" | 33 SYSTEMS="$1" |
44 fi | 34 fi |
45 | 35 |
46 if [[ $CACHED ]] ; then | 36 reset && \ |
47 reset && | 37 ./dartdomgenerator.py --systems="$SYSTEMS" --logging=40 --update-dom-metadata |
48 ./dartdomgenerator.py --use-database-cache --systems="$SYSTEMS" \ | |
49 --update-dom-metadata | |
50 else | |
51 reset && | |
52 ./dartdomgenerator.py --rebuild --systems="$SYSTEMS" --blink-parser \ | |
53 --logging=40 --update-dom-metadata | |
54 fi | |
OLD | NEW |