(CommandList children: [ (C {(set)} {(-u)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ARGV0) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(basename)} {(DQ ($ VSub_Number '$0'))})]) left_token: <Left_Backtick '`'> spids: [46 52] ) } spids: [45] ) ] spids: [45] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ARGV0_DIR) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(dirname)} {(DQ ($ VSub_Number '$0'))})]) left_token: <Left_Backtick '`'> spids: [55 61] ) } spids: [54] ) ] spids: [54] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SHLIB_DIR) op: Equal rhs: {(DQ (${ VSub_Name ARGV0_DIR) (/../lib))} spids: [63] ) ] spids: [63] ) (AndOr ops: [Op_DPipe] children: [ (C {(.)} { (BracedVarSub token: <VSub_Name SHFLAGS_LIB> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(${ VSub_Name SHLIB_DIR) (Lit_Slash /) (shflags)} ) spids: [77 85] ) } ) (Subshell child: (CommandList children: [ (Sentence child: (SimpleCommand words: [{(echo)} {(SQ <'unable to load shflags library'>)}] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) terminator: <Op_Semi ';'> ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) spids: [91 105] ) ] ) (AndOr ops: [Op_DPipe] children: [ (C {(.)} { (BracedVarSub token: <VSub_Name VERSIONS_LIB> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(${ VSub_Name SHLIB_DIR) (Lit_Slash /) (versions)} ) spids: [109 117] ) } ) (Subshell child: (CommandList children: [ (Sentence child: (SimpleCommand words: [{(echo)} {(SQ <'unable to load versions library'>)}] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) terminator: <Op_Semi ';'> ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) spids: [123 137] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OUTPUT_FILE) op: Equal rhs: {(DQ (${ VSub_Name VERSIONS_OS_NAME) (_) (${ VSub_Name VERSIONS_OS_RELEASE))} spids: [140] ) ] spids: [140] ) (C {(DEFINE_string)} {(SQ <command>)} {(SQ )} {(SQ <'the command to start a build'>)} {(SQ <c>)}) (C {(DEFINE_string)} {(SQ <watch>)} {(SQ )} {(SQ <'file to watch for changes'>)} {(SQ <w>)}) (C {(DEFINE_string)} {(SQ <watch_from>)} {(SQ )} {(SQ <'file containing filenames to watch'>)} {(SQ <W>)} ) (C {(DEFINE_string)} {(SQ <output>)} {(DQ (${ VSub_Name OUTPUT_FILE))} {(SQ <'output file to write to'>)} {(SQ <o>)} ) (C {(DEFINE_string)} {(SQ <output_dir>)} {(SQ <.>)} {(SQ <'directory to write output file'>)} {(SQ <O>)} ) (C {(DEFINE_integer)} {(SQ <pause>)} {(60)} {(SQ <'pause between successive runs (sec)'>)} {(SQ <p>)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FLAGS_HELP) op: Equal rhs: {(DQ ('USAGE: ') (${ VSub_Name ARGV0) (' [flags]'))} spids: [261] ) ] spids: [261] ) (FuncDef name: die body: (BraceGroup children: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-ne)} {(0)} {(Lit_Other ']')}) (SimpleCommand words: [{(echo)} {(DQ ($ VSub_At '$@'))}] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) ] ) (C {(flags_help)}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [303] ) spids: [299 302] ) (FuncDef name: isodate body: (BraceGroup children:[(C {(date)} {(-u)} {(SQ <'+%Y%m%dT%H%M%SZ'>)})] spids:[360]) spids: [356 359] ) (FuncDef name: age body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:awkScript) op:Equal rhs:{(SQ )} spids:[381])] spids: [381] ) (Case to_match: {(${ VSub_Name VERSIONS_OS_NAME)} arms: [ (case_arm pat_list: [{(FreeBSD)} {(Solaris)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:awkScript) op: Equal rhs: {(SQ <'{print $6,$7,$8}'>)} spids: [400] ) ] spids: [400] ) ] spids: [395 398 405 16777215] ) (case_arm pat_list: [{(Linux)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:awkScript) op: Equal rhs: {(SQ <'{print $6,$7}'>)} spids: [411] ) ] spids: [411] ) ] spids: [408 409 416 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (SimpleCommand words: [ {(echo)} {(DQ ('unrecognized OS name (') (${ VSub_Name VERSIONS_OS_NAME) (')'))} ] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) ] spids: [419 420 435 16777215] ) ] spids: [386 392 438] ) (Pipeline children: [ (C {(ls)} {(-l)} {(DQ ($ VSub_Number '$1'))}) (C {(awk)} {(DQ (${ VSub_Name awkScript))}) ] negated: F ) ] spids: [378] ) spids: [374 377] ) (FuncDef name: main body: (BraceGroup children: [ (AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-n)} {(DQ (${ VSub_Name FLAGS_command))} {(Lit_Other ']')}) (C {(die)} {(SQ <'command required'>)}) ] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-z)} {(DQ (${ VSub_Name FLAGS_watch))} {(-a)} {(-z)} {(DQ (${ VSub_Name FLAGS_watch_from))} {(Lit_Other ']')} ) (C {(die)} {(SQ <'one of watch or watch_from required'>)}) ] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-n)} {(DQ (${ VSub_Name FLAGS_watch))} {(-a)} {(-n)} {(DQ (${ VSub_Name FLAGS_watch_from))} {(Lit_Other ']')} ) (C {(die)} {(SQ <'only one of watch or watch_from can be specified'>)}) ] ) (AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-r)} {(DQ (${ VSub_Name FLAGS_watch))} {(Lit_Other ']')}) (C {(die)} {(SQ <'unable to read watch file'>)}) ] ) (AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-w)} {(DQ (${ VSub_Name FLAGS_output_dir))} {(Lit_Other ']')}) (C {(die)} {(SQ <'unable to write to output directory'>)}) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:watchAge) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(age)} {(DQ (${ VSub_Name FLAGS_watch))})] ) left_token: <Left_Backtick '`'> spids: [613 621] ) } spids: [612] ) ] spids: [612] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:watchAgePrev) op: Equal rhs: {(${ VSub_Name watchAge)} spids: [624] ) ] spids: [624] ) (WhileUntil keyword: <KW_While while> cond: [(Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ (${ VSub_Name watchAge))} {(Lit_Other '=') (Lit_Other '=')} {(DQ (${ VSub_Name watchAgePrev))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:date) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(isodate)})]) left_token: <Left_Backtick '`'> spids: [671 673] ) } spids: [670] ) ] spids: [670] ) (C {(echo)} { (DQ ('building ') (${ VSub_Name VERSIONS_OS_NAME) (-) (${ VSub_Name VERSIONS_OS_RELEASE) (' @ ') (${ VSub_Name date) ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:outputFileDated) op: Equal rhs: {(DQ (${ VSub_Name FLAGS_output) (-) (${ VSub_Name date))} spids: [694] ) ] spids: [694] ) (SimpleCommand words: [{(${ VSub_Name FLAGS_command)}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: { (DQ (${ VSub_Name FLAGS_output_dir) (/) (${ VSub_Name outputFileDated) ) } ) (Redir op: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) ] ) (Subshell child: (CommandList children: [ (Sentence child: (C {(cd)} {(DQ (${ VSub_Name FLAGS_output_dir))}) terminator: <Op_Semi ';'> ) (Sentence child: (C {(rm)} {(-f)} {(DQ (${ VSub_Name FLAGS_output))}) terminator: <Op_Semi ';'> ) (Sentence child: (C {(ln)} {(-s)} {(DQ (${ VSub_Name outputFileDated))} {(DQ (${ VSub_Name FLAGS_output))} ) terminator: <Op_Semi ';'> ) (Sentence child: (C {(grep)} {(FAIL)} {(DQ (${ VSub_Name FLAGS_output))}) terminator: <Op_Semi ';'> ) ] ) spids: [726 779] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:watchAgePrev) op: Equal rhs: {(${ VSub_Name watchAge)} spids: [783] ) ] spids: [783] ) ] spids: [16777215 667] ) ] spids: [16777215 789] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:watchAge) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(age)} {(DQ (${ VSub_Name FLAGS_watch))})] ) left_token: <Left_Backtick '`'> spids: [794 802] ) } spids: [793] ) ] spids: [793] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name watchAge))} {(Lit_Other '=') (Lit_Other '=')} {(DQ (${ VSub_Name watchAgePrev))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(SQ <sleeping...>)}) (WhileUntil keyword: <KW_While while> cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name watchAge))} {(Lit_Other '=') (Lit_Other '=')} {(DQ (${ VSub_Name watchAgePrev))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (C {(sleep)} {(${ VSub_Name FLAGS_pause)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:watchAge) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(age)} {(DQ (${ VSub_Name FLAGS_watch))}) ] ) left_token: <Left_Backtick '`'> spids: [870 878] ) } spids: [869] ) ] spids: [869] ) ] spids: [859 881] ) ) ] spids: [16777215 827] ) ] spids: [16777215 884] ) ] spids: [640 887] ) ) ] spids: [475] ) spids: [471 474] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:argv0) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name ARGV0))}) (C {(sed)} {(SQ <'s/_test$//;s/_test\\.sh$//'>)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [896 911] ) } spids: [895] ) ] spids: [895] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name ARGV0))} {(Lit_Other '=')} {(DQ (${ VSub_Name argv0))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(FLAGS)} {(DQ ($ VSub_At '$@'))}) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {($ VSub_QMark '$?')} ) ] ) (C {(eval)} {(set)} {(--)} {(DQ (${ VSub_Name FLAGS_ARGV))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (C {(main)} {(DQ ($ VSub_At '$@'))}) terminator: <Op_Semi ';'> ) ] spids: [16777215 976] ) ] else_action: [(Sentence child:(C {(main)}) terminator:<Op_Semi ';'>)] spids: [985 990] ) ] spids: [16777215 934] ) ] spids: [16777215 992] ) ] )