#!/usr/bin/env bash # set -x # go.sh [systems] # # Convenience script to generate systems. Do not call from build steps or tests # - call fremontcutbuilder and dartdomgenerator instead. Do not add 'real' # functionality here - change the python code instead. # # I find it essential to generate all the systems so I know if I am breaking # other systems. My habit is to run: # # ./go.sh | tee Q # # I can inspect file Q if needed. # # To generate a subset of systems: # # ./go.sh dart2js,htmldartium # # To re-gen all sdk/lib files (outside of a Dartium enlistment the file # 'sdk/lib/js/cached_patches.dart' might not need to be generated). To run # go.sh w/o the patches files used --no-cached-patches switch e.g., # # ./go.sh --no-cached-patches # # The following gives a picture of the changes due to 'work' # # git checkout master # select client without changes # ./go.sh # mv ../generated ../generated0 # save generated files # git checkout work # select client with changes # ./go.sh # meld ../generated0 ../generated # compare directories with too global ALLSYSTEMS := '"htmldart2js,htmldartium,_blink'" global SYSTEMS := $ALLSYSTEMS if [[ "$1" != "" ]] { if [[ "$1" =~ ^-- ]] { global ARG_OPTION := $1 } else { global SYSTEMS := $1 } } if [[ "$2" != "" ]] { if [[ "$2" =~ ^-- ]] { global ARG_OPTION := $2 } else { global SYSTEMS := $2 } } reset && \ ./dartdomgenerator.py --systems="$SYSTEMS" --logging=40 --update-dom-metadata --gen-interop $ARG_OPTION (CommandList children: [ (C {(set)} {(-x)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ALLSYSTEMS) op: Equal rhs: {(DQ ("htmldart2js,htmldartium,_blink"))} spids: [106] ) ] spids: [106] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SYSTEMS) op: Equal rhs: {(DQ ($ VSub_Name "$ALLSYSTEMS"))} spids: [111] ) ] spids: [111] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id:BoolBinary_GlobNEqual left:{(DQ ($ VSub_Number "$1"))} right:{(DQ )}) ) terminator: ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ ($ VSub_Number "$1"))} right: {(Lit_Other "^") (--)} ) ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ARG_OPTION) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [156] ) ] spids: [156] ) ] spids: [-1 153] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SYSTEMS) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [165] ) ] spids: [165] ) ] spids: [162 171] ) ] spids: [-1 134] ) ] spids: [-1 173] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id:BoolBinary_GlobNEqual left:{(DQ ($ VSub_Number "$2"))} right:{(DQ )}) ) terminator: ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ ($ VSub_Number "$2"))} right: {(Lit_Other "^") (--)} ) ) terminator: ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ARG_OPTION) op: Equal rhs: {(DQ ($ VSub_Number "$2"))} spids: [215] ) ] spids: [215] ) ] spids: [-1 212] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SYSTEMS) op: Equal rhs: {(DQ ($ VSub_Number "$2"))} spids: [224] ) ] spids: [224] ) ] spids: [221 230] ) ] spids: [-1 193] ) ] spids: [-1 232] ) (AndOr children: [ (C {(reset)}) (C {(./dartdomgenerator.py)} {(--systems) (Lit_Other "=") (DQ ($ VSub_Name "$SYSTEMS"))} {(--logging) (Lit_Other "=") (40)} {(--update-dom-metadata)} {(--gen-interop)} {(DQ ($ VSub_Name "$ARG_OPTION"))} ) ] op_id: Op_DAmp ) ] )