(command.CommandList children: [ (C {(set)} {(-u)}) (command.FuncDef name: die body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(0)} {(Lit_Other ']')}) (command.SimpleCommand words: [{(echo)} {(DQ ('error: ') ($ VSub_Star '$*'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) ] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [67] ) spids: [63 66] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:BASE_DIR spids:[100]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(dirname)} {(DQ ($ VSub_Number '$0'))})] ) left_token: <Left_CommandSub '$('> spids: [101 107] ) } spids: [100] ) ] spids: [100] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:LIB_DIR spids:[109]) op: Equal rhs: {(DQ (${ VSub_Name BASE_DIR) (/lib))} spids: [109] ) ] spids: [109] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(.)} {(DQ (${ VSub_Name LIB_DIR) (/shflags))}) (C {(die)} {(SQ <'unable to load shflags library'>)}) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(.)} {(DQ (${ VSub_Name LIB_DIR) (/shlib))}) (C {(die)} {(SQ <'unable to load shlib library'>)}) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(.)} {(DQ (${ VSub_Name LIB_DIR) (/versions))}) (C {(die)} {(SQ <'unable to load versions library'>)}) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:BASE_DIR spids:[182]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(shlib_relToAbsPath)} {(DQ (${ VSub_Name BASE_DIR))})] ) left_token: <Left_CommandSub '$('> spids: [183 191] ) } spids: [182] ) ] spids: [182] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:os_name spids:[197]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [(C {(versions_osName)}) (C {(sed)} {(SQ <'s/ /_/g'>)})] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [198 207] ) } spids: [197] ) ] spids: [197] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:os_version spids:[209]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(versions_osVersion)})]) left_token: <Left_CommandSub '$('> spids: [210 212] ) } spids: [209] ) ] spids: [209] ) (C {(DEFINE_boolean)} {(force)} {(false)} {(SQ <'force overwrite'>)} {(f)}) (C {(DEFINE_string)} {(output_dir)} {(DQ (${ VSub_Name TMPDIR))} {(SQ <'output dir'>)} {(d)}) (C {(DEFINE_string)} {(output_file)} {(DQ (${ VSub_Name os_name) (-) (${ VSub_Name os_version) (.txt))} {(SQ <'output file'>)} {(o)} ) (C {(DEFINE_string)} {(runner)} {(SQ <test_runner>)} {(SQ <'unit test runner'>)} {(r)}) (C {(DEFINE_boolean)} {(dry_run)} {(false)} {(DQ ('suppress logging to a file'))} {(n)}) (command.FuncDef name: main body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:output spids:[306]) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name FLAGS_output_dir> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonPlus arg_word: {(${ VSub_Name FLAGS_output_dir) (Lit_Slash /)} ) spids: [308 315] ) (${ VSub_Name FLAGS_output_file) ) } spids: [306] ) ] spids: [306] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:output spids:[322]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(shlib_relToAbsPath)} {(DQ (${ VSub_Name output))})] ) left_token: <Left_CommandSub '$('> spids: [323 331] ) } spids: [322] ) ] spids: [322] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name FLAGS_dry_run))} {(-eq)} {(DQ (${ VSub_Name FLAGS_FALSE))} {(-a)} {(-f)} {(DQ (${ VSub_Name output))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name FLAGS_force))} {(-eq)} {(DQ (${ VSub_Name FLAGS_TRUE))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(rm)} {(-f)} {(DQ (${ VSub_Name output))})] spids: [16777215 394] ) ] else_action: [ (command.SimpleCommand words: [{(echo)} {(DQ ("not overwriting '") (${ VSub_Name output) ("'"))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(DQ (${ VSub_Name FLAGS_ERROR))} ) ] spids: [408 434] ) ] spids: [16777215 370] ) ] spids: [16777215 437] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name FLAGS_dry_run))} {(-eq)} {(DQ (${ VSub_Name FLAGS_FALSE))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DPipe] children: [ (command.SimpleCommand words: [{(touch)} {(DQ (${ VSub_Name output))}] redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) (C {(die)} {(DQ ("unable to write to '") (${ VSub_Name output) ("'"))}) ] ) ] spids: [16777215 461] ) ] spids: [16777215 488] ) (command.Subshell child: (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name FLAGS_dry_run))} {(-eq)} {(DQ (${ VSub_Name FLAGS_FALSE))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Pipeline children: [ (C {(DQ (./) (${ VSub_Name FLAGS_runner))}) (C {(tee)} {(DQ (${ VSub_Name output))}) ] negated: F ) ] spids: [16777215 520] ) ] else_action: [(C {(DQ (./) (${ VSub_Name FLAGS_runner))})] spids: [540 551] ) spids: [496 554] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name FLAGS_dry_run))} {(-eq)} {(DQ (${ VSub_Name FLAGS_FALSE))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.SimpleCommand words: [{(echo)}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.SimpleCommand words: [{(echo)} {(DQ ("Output written to '") (${ VSub_Name output) ("'."))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) ] spids: [16777215 579] ) ] spids: [16777215 602] ) ] spids: [295] ) spids: [291 294] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(FLAGS)} {(DQ ($ VSub_At '$@'))}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{($ VSub_QMark '$?')}) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(DQ (${ VSub_Name FLAGS_help))} {(-eq)} {(DQ (${ VSub_Name FLAGS_FALSE))} {(Lit_Other ']')} ) (command.ControlFlow token:<ControlFlow_Exit exit>) ] ) (C {(eval)} {(set)} {(--)} {(DQ (${ VSub_Name FLAGS_ARGV))}) (C {(main)} { (DQ (word_part.BracedVarSub token: <VSub_At '@'> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:(word.EmptyWord)) spids: [656 659] ) ) } ) ] )