(command.CommandList children: [ (command.ShFunction name: do_build body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:descr) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [16] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:board) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [20] ) ] ) (C {<shift>}) (C {<shift>}) (C {<echo>} { (DQ <'building '> ($ Id.VSub_DollarName '$descr') <' '> ($ Id.VSub_DollarName '$board')) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:build_dir) op: assign_op.Equal rhs: {<'/tmp/stm-build-'> ($ Id.VSub_DollarName '$board')} spids: [40] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<make>} {<-B>} {($ Id.VSub_At '$@')} {<Id.Lit_VarLike 'BOARD='> ($ Id.VSub_DollarName '$board')} {<Id.Lit_VarLike 'BUILD='> ($ Id.VSub_DollarName '$build_dir')} ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) (C {<mv>} {($ Id.VSub_DollarName '$build_dir') <'/firmware.dfu'>} {($ Id.VSub_DollarName '$dest_dir') <'/'> ($ Id.VSub_DollarName '$descr') <-> ($ Id.VSub_DollarName '$date') <-> ($ Id.VSub_DollarName '$git_tag') <.dfu> } ) (C {<rm>} {<-rf>} {($ Id.VSub_DollarName '$build_dir')}) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {(DQ <'usage: '> ($ Id.VSub_Number '$0') <' <dest-dir>'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [91 105] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dest_dir) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [124] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-r>} {<modpyb.c>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {(DQ <'must be in stm directory'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [131 144] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:date) op: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<date>} {(SQ <'+%Y-%m-%d'>)}))} spids: [164] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:git_tag) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.AndOr ops: [Id.Op_DPipe] children: [(C {<git>} {<describe>} {<--dirty>}) (C {<echo>} {<unknown>})] ) ) ) } spids: [177] ) ] ) (C {<do_build>} {<pybv3>} {<PYBV3>}) (C {<do_build>} {<pybv3-network>} {<PYBV3>} {<Id.Lit_VarLike 'MICROPY_PY_WIZNET5K='> <1>} {<Id.Lit_VarLike 'MICROPY_PY_CC3K='> <1>} ) (C {<do_build>} {<pybv10>} {<PYBV10>}) (C {<do_build>} {<pybv10-network>} {<PYBV10>} {<Id.Lit_VarLike 'MICROPY_PY_WIZNET5K='> <1>} {<Id.Lit_VarLike 'MICROPY_PY_CC3K='> <1>} ) (C {<do_build>} {<stm32f4disc>} {<STM32F4DISC>}) (C {<do_build>} {<espruino-pico>} {<ESPRUINO_PICO>}) ] )