(command.CommandList children: [ (C {<set>} {<-o>} {<errexit>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name BAZEL_WRKDIR))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<mkdir>} {<-p>} {(DQ (${ Id.VSub_Name BAZEL_WRKDIR) <'/tmp'>)}) (C {<mkdir>} {<-p>} {(DQ (${ Id.VSub_Name BAZEL_WRKDIR) <'/user_root'>)}) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name TMPDIR> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {(${ Id.VSub_Name BAZEL_WRKDIR) <Id.Lit_Slash '/'> <tmp>} ) ) } ) (C {<export>} {<TMPDIR>}) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name BAZEL_DIR_STARTUP_OPTIONS> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {(DQ <'--output_user_root='> (${ Id.VSub_Name BAZEL_WRKDIR) <'/user_root'>)} ) ) } ) ] spids: [62 78] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DIR) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<cd>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<dirname>} { (DQ (braced_var_sub token: <Id.VSub_Name BASH_SOURCE> bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>}) ) ) } ) ) ) } ) (C {<pwd>}) ] ) ) } spids: [144] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WORKSPACE_DIR) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<dirname>} { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<dirname>} {(${ Id.VSub_Name DIR)}) ) } ) ) ) } spids: [168] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:JAVA_VERSION) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name JAVA_VERSION> suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{<1.8>}) ) } spids: [184] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BAZELRC) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name BAZELRC> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonHyphen ':-'> arg_word: {(DQ <'/dev/null'>)} ) ) } spids: [191] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PLATFORM) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [(C {<uname>} {<-s>}) (C {<tr>} {(SQ <A-Z>)} {(SQ <a-z>)})] negated: F ) ) ) } spids: [200] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MACHINE_TYPE) op: assign_op.Equal rhs: {(DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<uname>} {<-m>})))} spids: [222] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MACHINE_IS_64BIT) op: assign_op.Equal rhs: {(SQ <no>)} spids: [231] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name MACHINE_TYPE))} {<Id.Lit_Equals '='>} {(SQ <amd64>)} {<-o>} {(DQ (${ Id.VSub_Name MACHINE_TYPE))} {<Id.Lit_Equals '='>} {(SQ <x86_64>)} {<-o>} {(DQ (${ Id.VSub_Name MACHINE_TYPE))} {<Id.Lit_Equals '='>} {(SQ <s390x>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MACHINE_IS_64BIT) op: assign_op.Equal rhs: {(SQ <yes>)} spids: [286] ) ] ) ] spids: [236 283] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MACHINE_IS_ARM) op: assign_op.Equal rhs: {(SQ <no>)} spids: [294] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name MACHINE_TYPE))} {<Id.Lit_Equals '='>} {(SQ <arm>)} {<-o>} {(DQ (${ Id.VSub_Name MACHINE_TYPE))} {<Id.Lit_Equals '='>} {(SQ <armv7l>)} {<-o>} {(DQ (${ Id.VSub_Name MACHINE_TYPE))} {<Id.Lit_Equals '='>} {(SQ <aarch64>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MACHINE_IS_ARM) op: assign_op.Equal rhs: {(SQ <yes>)} spids: [349] ) ] ) ] spids: [299 346] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MACHINE_IS_Z) op: assign_op.Equal rhs: {(SQ <no>)} spids: [357] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name MACHINE_TYPE))} {<Id.Lit_Equals '='>} {(SQ <s390x>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MACHINE_IS_Z) op: assign_op.Equal rhs: {(SQ <yes>)} spids: [384] ) ] ) ] spids: [362 381] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:EXE_EXT) op: assign_op.Equal rhs: {(DQ )} spids: [395] ) ] ) (command.Case to_match: {(DQ (${ Id.VSub_Name PLATFORM))} arms: [ (case_arm pat_list: [{<msys> <Id.Lit_Star '*'>} {<mingw> <Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:EXE_EXT) op: assign_op.Equal rhs: {(DQ <.exe>)} spids: [417] ) ] ) ] spids: [409 414 -1 422] ) ] ) (command.Case to_match: {(DQ (${ Id.VSub_Name PLATFORM))} arms: [ (case_arm pat_list: [{<msys> <Id.Lit_Star '*'>} {<mingw> <Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:default_tmp) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name TMP> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonHyphen ':-'> arg_word: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<cygpath>} {<-W>}) ) <Id.Lit_Slash '/'> <Temp> } ) ) } spids: [446] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TMPDIR) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<cygpath>} {<-ml>} { (DQ (braced_var_sub token: <Id.VSub_Name TMPDIR> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonHyphen ':-'> arg_word: {($ Id.VSub_DollarName '$default_tmp')} ) ) ) } ) ) } spids: [460] ) ] ) ] spids: [438 443 -1 475] ) ] ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name VERBOSE> suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonEquals ':='> arg_word:{<yes>}) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ATEXIT_HANDLERS) op: assign_op.Equal rhs: (word.Empty) spids: [500] ) ] ) (command.ShFunction name: atexit body: (BraceGroup children: [ (command.Sentence child: (C {<local>} {<Id.Lit_VarLike 'handler='> (DQ (${ Id.VSub_Number 1))}) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name ATEXIT_HANDLERS))} {<Id.Lit_RBracket ']'>} ) (C {<trap>} {(SQ <'run_atexit_handlers $?'>)} {<EXIT>}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ATEXIT_HANDLERS) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name ATEXIT_HANDLERS) <' '> (${ Id.VSub_Name handler))} spids: [561] ) ] ) ] ) ) (command.ShFunction name: run_atexit_handlers body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'exit_code='> (DQ ($ Id.VSub_QMark '$?'))}) (C {<local>} {<Id.Lit_VarLike 'failed='> <no>}) (command.ForEach iter_name: handler iter_words: [{(${ Id.VSub_Name ATEXIT_HANDLERS)}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<eval>} {(DQ (${ Id.VSub_Name handler))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:failed) op: assign_op.Equal rhs: {<yes>} spids: [638] ) ] ) ] ) ] ) ) (C {<trap>} {<->} {<EXIT>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name exit_code)} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {(${ Id.VSub_Name exit_code)} ) ] spids: [656 671] ) ] else_action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name failed))} {<Id.Lit_Equals '='>} {<yes>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} {(DQ <'Program tried to exit successfully but atexit routines failed'>)} ] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [684 701] ) ] else_action: [(command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})] ) ] ) ] ) ) (command.ShFunction name: tempdir body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'tmp='> (braced_var_sub token: <Id.VSub_Name TMPDIR> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonHyphen ':-'> arg_word: {<Id.Lit_Slash '/'> <tmp>} ) ) } ) (C {<local>} {<Id.Lit_VarLike 'DIR='> (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<mktemp>} {<-d>} { (braced_var_sub token: <Id.VSub_Name tmp> suffix_op: (suffix_op.Unary tok: <Id.VOp1_DPercent '%%'> arg_word: {<Id.Lit_Slash '/'>} ) ) <'/bazel_XXXXXXXX'> } ) ) ) } ) (C {<mkdir>} {<-p>} {(DQ (${ Id.VSub_Name DIR))}) (C {<local>} {<Id.Lit_VarLike 'DIRBASE='> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<basename>} {(DQ (${ Id.VSub_Name DIR))}) ) } ) (C {<eval>} { (DQ <cleanup_tempdir_> (${ Id.VSub_Name DIRBASE) <'() { rm -rf \''> (${ Id.VSub_Name DIR) <'\'; }'> ) } ) (C {<atexit>} {<cleanup_tempdir_> (${ Id.VSub_Name DIRBASE)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NEW_TMPDIR) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name DIR))} spids: [822] ) ] ) ] ) ) (C {<tempdir>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OUTPUT_DIR) op: assign_op.Equal rhs: {(${ Id.VSub_Name NEW_TMPDIR)} spids: [833] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:phasefile) op: assign_op.Equal rhs: {(${ Id.VSub_Name OUTPUT_DIR) <'/phase'>} spids: [838] ) ] ) (command.ShFunction name: cleanup_phasefile body: (BraceGroup children: [ (command.Sentence child: (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ (${ Id.VSub_Name phasefile))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (command.Simple words: [{<echo>}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.Simple words: [{<cat>} {(DQ (${ Id.VSub_Name phasefile))}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) ] spids: [853 868] ) ] ) terminator: <Id.Op_Semi _> ) ] ) ) (C {<atexit>} {<cleanup_phasefile>}) (command.ShFunction name: run body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name VERBOSE))} {<Id.Lit_Equals '='>} {<yes>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {(DQ (${ Id.VSub_At '@'))}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(DQ (${ Id.VSub_At '@'))}) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_QMark '$?')} ) ] ) ] spids: [929 946] ) ] else_action: [ (C {<local>} {<Id.Lit_VarLike 'errfile='> (DQ (${ Id.VSub_Name OUTPUT_DIR) <'/errors'>)}) (command.Simple words: [{<echo>} {(DQ (${ Id.VSub_At '@'))}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ (${ Id.VSub_Name errfile))} ) ] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{(DQ (${ Id.VSub_At '@'))}] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {(DQ (${ Id.VSub_Name errfile))} ) (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] do_fork: T ) ] negated: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<local>} {<Id.Lit_VarLike 'exitcode='> ($ Id.VSub_QMark '$?')}) (command.Simple words: [{<cat>} {(DQ (${ Id.VSub_Name errfile))}] redirects: [ (redir op: <Id.Redir_GreatAnd '1>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName '$exitcode')} ) ] spids: [1002 1023] ) ] ) ] ) ] ) ) (command.ShFunction name: fail body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'exitCode='> ($ Id.VSub_QMark '$?')}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobEqual left: {(DQ ($ Id.VSub_DollarName '$exitCode'))} right: {(DQ <0>)} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:exitCode) op: assign_op.Equal rhs: {<1>} spids: [1092] ) ] ) ] spids: [1072 1089] ) ] ) (command.Simple words: [{<echo>}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <'ERROR: '> ($ Id.VSub_At '$@'))}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName '$exitCode')} ) ] ) ) (command.ShFunction name: display body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_z child: {(DQ (${ Id.VSub_Name QUIETMODE))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {<-e>} {(DQ ($ Id.VSub_At '$@'))}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) ] spids: [1132 1147] ) ] ) ] ) ) (command.ShFunction name: log body: (BraceGroup children: [ (command.Simple words: [{<echo>} {<-n>} {(DQ <.>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_Number '$1'))}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(${ Id.VSub_Name phasefile)} ) ] do_fork: T ) ] ) ) (command.ShFunction name: clear_log body: (BraceGroup children: [ (command.Simple words: [{<echo>}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (C {<rm>} {<-f>} {(${ Id.VSub_Name phasefile)}) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LEAVES) op: assign_op.Equal rhs: { (DQ <Id.Lit_BadBackslash '\\'> <xF0> <Id.Lit_BadBackslash '\\'> <x9F> <Id.Lit_BadBackslash '\\'> <x8D> <Id.Lit_BadBackslash '\\'> <x83> ) } spids: [1228] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INFO) op: assign_op.Equal rhs: {(DQ <Id.Lit_BadBackslash '\\'> <'033[32mINFO'> <Id.Lit_BadBackslash '\\'> <'033[0m:'>)} spids: [1240] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WARNING) op: assign_op.Equal rhs: {(DQ <Id.Lit_BadBackslash '\\'> <'033[31mWARN'> <Id.Lit_BadBackslash '\\'> <'033[0m:'>)} spids: [1248] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:first_step) op: assign_op.Equal rhs: {<1>} spids: [1257] ) ] ) (command.ShFunction name: new_step body: (BraceGroup children: [ (C {<rm>} {<-f>} {(${ Id.VSub_Name phasefile)}) (C {<local>} {<Id.Lit_VarLike 'new_line='>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name first_step))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:first_step) op: assign_op.Equal rhs: (word.Empty) spids: [1301] ) ] ) ] spids: [1283 1298] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new_line) op: assign_op.Equal rhs: {(DQ <Id.Lit_BadBackslash '\\'> <n>)} spids: [1307] ) ] ) ] ) (C {<display>} {<-n>} { (DQ ($ Id.VSub_DollarName '$new_line') ($ Id.VSub_DollarName '$LEAVES') <' '> ($ Id.VSub_Number '$1') ) } ) ] ) ) (command.ShFunction name: git_sha1 body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-x>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.AndOr ops: [Id.Op_DPipe] children: [(C {<which>} {<git>}) (C {<true>})] ) ) ) } {<Id.Lit_RBracket ']'>} ) (C {<Id.Lit_LBracket '['>} {<-d>} {<.git>} {<Id.Lit_RBracket ']'>}) ] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<git>} {<rev-parse>} {<--short>} {<HEAD>}] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<true>}) ] ) ] spids: [1340 1371] ) ] ) ] ) ) (command.ShFunction name: git_date body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-x>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.AndOr ops: [Id.Op_DPipe] children: [(C {<which>} {<git>}) (C {<true>})] ) ) ) } {<Id.Lit_RBracket ']'>} ) (C {<Id.Lit_LBracket '['>} {<-d>} {<.git>} {<Id.Lit_RBracket ']'>}) ] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Pipeline children: [ (C {<git>} {<log>} {<-1>} {<--pretty> <Id.Lit_Equals '='> <Id.Lit_Other '%'> <ai>} ) (C {<cut>} {<-d>} {(DQ <' '>)} {<-f>} {<1>}) ] negated: F ) (C {<true>}) ] ) ] spids: [1404 1435] ) ] ) ] ) ) (command.ShFunction name: get_last_version body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ <CHANGELOG.md>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<local>} {<Id.Lit_VarLike 'version='> (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<fgrep>} {<-m>} {<1>} {(SQ <'## Release'>)} {<CHANGELOG.md>}) (C {<sed>} {<-E>} {(SQ <'s|.*Release (.*) \\(.*\\)|\\1|'>)}) ] negated: F ) ) ) } ) ] spids: [1488 1501] ) ] else_action: [(C {<local>} {<Id.Lit_VarLike 'version='> (DQ )})] ) (C {<local>} {<Id.Lit_VarLike 'date='> (DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<git_date>}))) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} { (DQ (braced_var_sub token: <Id.VSub_Name version> suffix_op: (suffix_op.Unary tok:<Id.VTest_Hyphen -> arg_word:(word.Empty)) ) ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:version) op: assign_op.Equal rhs: {(DQ <unknown>)} spids: [1579] ) ] ) ] spids: [1560 1576] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} { (DQ (braced_var_sub token: <Id.VSub_Name date> suffix_op: (suffix_op.Unary tok:<Id.VTest_Hyphen -> arg_word:(word.Empty)) ) ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:date) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<date>} {<Id.Lit_Other '+'> <Id.Lit_Other '%'> <Y-> <Id.Lit_Other '%'> <m-> <Id.Lit_Other '%'> <d> } ) ) ) } spids: [1607] ) ] ) ] spids: [1588 1604] ) ] ) (C {<echo>} {(DQ (${ Id.VSub_Name version) <-> (${ Id.VSub_Name date))}) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(${ Id.VSub_Name PLATFORM)} right: {(DQ <darwin>)} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShFunction name: md5_file body: (BraceGroup children: [ (C {<echo>} { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [(C {<cat>} {($ Id.VSub_Number '$1')}) (C {<md5>})] negated: F ) ) } {($ Id.VSub_Number '$1')} ) ] ) ) ] spids: [1641 1658] ) ] else_action: [ (command.ShFunction name: md5_file body: (BraceGroup children:[(C {<md5sum>} {($ Id.VSub_Number '$1')})]) ) ] ) (command.ShFunction name: get_java_version body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$JAVA_HOME'))}) (C {<fail>} { (DQ <'JDK not found, please set '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <JAVA_HOME.> ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:JAVAC) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name JAVA_HOME) <'/bin/javac'>)} spids: [1746] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_x child:{(DQ (${ Id.VSub_Name JAVAC))}) ) (C {<fail>} { (DQ <'JAVA_HOME ('> ($ Id.VSub_DollarName '$JAVA_HOME') <') is not a path to a working JDK.'> ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:JAVAC_VERSION) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Simple words: [{(DQ (${ Id.VSub_Name JAVAC))} {<-version>}] redirects: [ (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] do_fork: T ) ) } spids: [1781] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {(DQ ($ Id.VSub_DollarName '$JAVAC_VERSION'))} right: {<javac> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\ '> ) <Id.Lit_Other '('> <1> <Id.Lit_RegexMeta '\\.'> <Id.Lit_Other '('> <Id.Lit_Other '['> <789> <Id.Lit_Other ']'> <Id.Lit_Other '|'> <Id.Lit_Other '['> <1-9> <Id.Lit_Other ']'> <Id.Lit_Other '['> <0-9> <Id.Lit_Other ']'> <Id.Lit_Other ')'> <Id.Lit_Other ')'> <Id.Lit_Other .> <Id.Lit_Other '*'> <Id.Lit_Other '$'> } ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:JAVAC_VERSION) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name BASH_REMATCH> bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 1>}) ) } spids: [1834] ) ] ) ] spids: [1796 1831] ) ] else_action: [ (C {<fail>} { (DQ <'Cannot determine JDK version, please set '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <JAVA_HOME.> <Id.Lit_BadBackslash '\\'> <n> ) } { (DQ (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <'JAVAC_VERSION is '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) (${ Id.VSub_Name JAVAC_VERSION) (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) ) } ) ] ) ] ) ) (command.ShFunction name: get_bind_target body: (BraceGroup children: [ (C {($ Id.VSub_DollarName '$BAZEL')} {<--bazelrc> <Id.Lit_Equals '='> (${ Id.VSub_Name BAZELRC)} {<--nomaster_bazelrc>} {(${ Id.VSub_Name BAZEL_DIR_STARTUP_OPTIONS)} {<query>} {(DQ <'deps('> ($ Id.VSub_Number '$1') <', 1) - '> ($ Id.VSub_Number '$1'))} ) ] ) ) ] )