(command.CommandList children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(DQ ($ VSub_Pound '$#'))} {(-ne)} {(1)} {(Lit_RBracket ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('Usage: appsign.sh *build dir*'))}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) ] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:BUILD) op:Equal rhs:{($ VSub_Number '$1')})] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children:[(C {(uname)} {(-s)})]) ) } {(Lit_Equals '=')} {(DQ (Darwin))} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [ {(echo)} {(-n)} { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children: [(C {(md5)} {(-q)} {($ VSub_DollarName '$BUILD') (/application.bin)})] ) ) } ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(__md5hash.bin)})] ) ] ) ] else_action: [ (command.Simple words: [ {(echo)} {(-n)} { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(md5sum)} {(--binary)} {($ VSub_DollarName '$BUILD') (/application.bin)}) (C {(awk)} {(SQ <'{ print $1 }'>)}) ] negated: F ) ] ) ) } ] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(__md5hash.bin)})] ) ] ) (command.Simple 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.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name 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')}) ] )