(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:USAGE) op: assign_op.Equal rhs: {(SQ <'bazel-run.sh [<bazel option>...] <target> [ -- [<target option>]... ]'>)} spids: [48] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DESCRIPTION) op: assign_op.Equal rhs: { (SQ <'\n'> <' Builds and runs the command generated by "bazel run" in the calling\n'> <' terminal. The command is run as a grandchild of the current shell,\n'> <' not from the Bazel server. Therefore, the program will have a controlling terminal, and\n'> <' the Bazel lock is released before running the command.'> ) } spids: [53] ) ] ) (command.ShFunction name: usage body: (command.BraceGroup children: [ (command.Simple words: [ {<echo>} {(DQ ($ Id.VSub_DollarName '$USAGE'))} {(DQ ($ Id.VSub_DollarName '$DESCRIPTION'))} ] redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})] ) ] ) ) (command.ShFunction name: die body: (command.BraceGroup children: [ (C {<echo>} {(DQ ($ Id.VSub_Number '$1'))}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ) (command.ShFunction name: cleanup body: (command.BraceGroup children:[(C {<rm>} {(DQ ($ Id.VSub_DollarName '$runcmd'))})]) ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-gt>} {<0>} {<Id.Lit_RBracket ']'>}) (command.BraceGroup children: [ (command.Sentence child:(C {<usage>}) terminator:<Id.Op_Semi _>) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) terminator: <Id.Op_Semi _> ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:runcmd) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [(C {<mktemp>} {</tmp/bazel-run.XXXXXX>})] ) ) ) } spids: [154] ) ] ) (C {<die>} {(DQ <'Could not create tmp file'>)}) ] ) (C {<trap>} {(DQ <cleanup>)} {<EXIT>}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<bazel>} {<run>} {<--script_path> <Id.Lit_Equals '='> (DQ ($ Id.VSub_DollarName '$runcmd'))} {(DQ ($ Id.VSub_At '$@'))} ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_QMark '$?')} ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {<-x>} {(DQ ($ Id.VSub_DollarName '$runcmd'))} {<Id.Lit_RBracket ']'>}) (C {<die>} {(DQ <'File '> ($ Id.VSub_DollarName '$runcmd') <' not executable'>)}) ] ) (C {(DQ ($ Id.VSub_DollarName '$runcmd'))}) ] )