(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:USAGE) op: Equal rhs: {(SQ <"bazel-run.sh [<bazel option>...] <target> [ -- [<target option>]... ]">)} spids: [48] ) ] spids: [48] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DESCRIPTION) 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] ) ] spids: [53] ) (FuncDef name: usage body: (BraceGroup children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name "$USAGE"))} {(DQ ($ VSub_Name "$DESCRIPTION"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[82])] ) ] spids: [69] ) spids: [63 68] ) (FuncDef name: die body: (BraceGroup children: [(C {(echo)} {(DQ ($ VSub_Number "$1"))}) (C {(exit)} {(1)})] spids: [94] ) spids: [88 93] ) (FuncDef name: cleanup body: (BraceGroup children:[(C {(rm)} {(DQ ($ VSub_Name "$runcmd"))})] spids:[117]) spids: [111 116] ) (AndOr children: [ (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-gt)} {(0)} {(Lit_Other "]")}) (BraceGroup children: [ (Sentence child:(C {(usage)}) terminator:<Op_Semi ";">) (Sentence child:(C {(exit)} {(1)}) terminator:<Op_Semi ";">) ] spids: [141] ) ] op_id: Op_DPipe ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:runcmd) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(mktemp)} {(/tmp/bazel-run.XXXXXX)})]) left_token: <Left_CommandSub "$("> spids: [156 160] ) ) } spids: [154] ) ] spids: [154] ) (C {(die)} {(DQ ("Could not create tmp file"))}) ] op_id: Op_DPipe ) (C {(trap)} {(DQ (cleanup))} {(EXIT)}) (AndOr children: [ (C {(bazel)} {(run)} {(--script_path) (Lit_Other "=") (DQ ($ VSub_Name "$runcmd"))} {(DQ ($ VSub_At "$@"))} ) (C {(exit)} {($ VSub_QMark "$?")}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(Lit_Other "[")} {(-x)} {(DQ ($ VSub_Name "$runcmd"))} {(Lit_Other "]")}) (C {(die)} {(DQ ("File ") ($ VSub_Name "$runcmd") (" not executable"))}) ] op_id: Op_DPipe ) (C {(DQ ($ VSub_Name "$runcmd"))}) ] )