(command.CommandList children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Pound '$#'))} {(-ne)} {(1)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('Usage: appsign.sh *build dir*'))}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) ] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:BUILD) op:Equal rhs:{($ VSub_Number '$1')})] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(uname)} {(-s)})]) left_token: <Left_Backtick '`'> ) } {(Lit_Other '=')} {(DQ (Darwin))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.SimpleCommand words: [ {(echo)} {(-n)} { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(md5)} {(-q)} {($ VSub_DollarName '$BUILD') (/application.bin)})] ) left_token: <Left_Backtick '`'> ) } ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(__md5hash.bin)})] ) ] ) ] else_action: [ (command.SimpleCommand words: [ {(echo)} {(-n)} { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(md5sum)} {(--binary)} {($ VSub_DollarName '$BUILD') (/application.bin)}) (C {(awk)} {(SQ <'{ print $1 }'>)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> ) } ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(__md5hash.bin)})] ) ] ) (command.SimpleCommand words: [{(cat)} {($ VSub_DollarName '$BUILD') (/application.bin)} {(__md5hash.bin)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_DollarName '$BUILD') (/mcuimg.bin)} ) ] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:RET) op:Equal rhs:{($ VSub_QMark '$?')})] ) (C {(rm)} {(-f)} {(__md5hash.bin)}) (C {(rm)} {(-f)} {($ VSub_DollarName '$BUILD') (/application.bin)}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{($ VSub_DollarName '$RET')}) ] )