(command.CommandList children: [ (C {<set>} {<-u>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ARGV0) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<basename>} {(DQ ($ Id.VSub_Number '$0'))}) ) } spids: [45] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ARGV0_DIR) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<dirname>} {(DQ ($ Id.VSub_Number '$0'))}) ) } spids: [56] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SHLIB_DIR) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name ARGV0_DIR) <'/../lib'>)} spids: [67] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<.>} { (braced_var_sub token: <Id.VSub_Name SHFLAGS_LIB> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonHyphen ':-'> arg_word: {(${ Id.VSub_Name SHLIB_DIR) <Id.Lit_Slash '/'> <shflags>} ) ) } ) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (command.Simple words: [{<echo>} {(SQ <'unable to load shflags library'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<.>} { (braced_var_sub token: <Id.VSub_Name VERSIONS_LIB> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonHyphen ':-'> arg_word: {(${ Id.VSub_Name SHLIB_DIR) <Id.Lit_Slash '/'> <versions>} ) ) } ) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (command.Simple words: [{<echo>} {(SQ <'unable to load versions library'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OUTPUT_FILE) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name VERSIONS_OS_NAME) <_> (${ Id.VSub_Name VERSIONS_OS_RELEASE))} spids: [144] ) ] ) (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 (${ Id.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>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FLAGS_HELP) op: assign_op.Equal rhs: {(DQ <'USAGE: '> (${ Id.VSub_Name ARGV0) <' [flags]'>)} spids: [265] ) ] ) (command.ShFunction name: die body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>}) (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_At '$@'))}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) ] ) (C {<flags_help>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ) (command.ShFunction name: isodate body: (BraceGroup children:[(C {<date>} {<-u>} {(SQ <'+%Y%m%dT%H%M%SZ'>)})]) ) (command.ShFunction name: age body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:awkScript) op: assign_op.Equal rhs: {(SQ )} spids: [385] ) ] ) (command.Case to_match: {(${ Id.VSub_Name VERSIONS_OS_NAME)} arms: [ (case_arm pat_list: [{<FreeBSD>} {<Solaris>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:awkScript) op: assign_op.Equal rhs: {(SQ <'{print $6,$7,$8}'>)} spids: [404] ) ] ) ] spids: [399 402 409 -1] ) (case_arm pat_list: [{<Linux>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:awkScript) op: assign_op.Equal rhs: {(SQ <'{print $6,$7}'>)} spids: [415] ) ] ) ] spids: [412 413 420 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.Simple words: [ {<echo>} {(DQ <'unrecognized OS name ('> (${ Id.VSub_Name VERSIONS_OS_NAME) <')'>)} ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) ] spids: [423 424 439 -1] ) ] ) (command.Pipeline children: [ (C {<ls>} {<-l>} {(DQ ($ Id.VSub_Number '$1'))}) (C {<awk>} {(DQ (${ Id.VSub_Name awkScript))}) ] negated: F ) ] ) ) (command.ShFunction name: main body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name FLAGS_command))} {<Id.Lit_RBracket ']'>} ) (C {<die>} {(SQ <'command required'>)}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name FLAGS_watch))} {<-a>} {<-z>} {(DQ (${ Id.VSub_Name FLAGS_watch_from))} {<Id.Lit_RBracket ']'>} ) (C {<die>} {(SQ <'one of watch or watch_from required'>)}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name FLAGS_watch))} {<-a>} {<-n>} {(DQ (${ Id.VSub_Name FLAGS_watch_from))} {<Id.Lit_RBracket ']'>} ) (C {<die>} {(SQ <'only one of watch or watch_from can be specified'>)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {<-r>} {(DQ (${ Id.VSub_Name FLAGS_watch))} {<Id.Lit_RBracket ']'>} ) (C {<die>} {(SQ <'unable to read watch file'>)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {<-w>} {(DQ (${ Id.VSub_Name FLAGS_output_dir))} {<Id.Lit_RBracket ']'>} ) (C {<die>} {(SQ <'unable to write to output directory'>)}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:watchAge) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<age>} {(DQ (${ Id.VSub_Name FLAGS_watch))}) ) } spids: [616] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:watchAgePrev) op: assign_op.Equal rhs: {(${ Id.VSub_Name watchAge)} spids: [630] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [(command.Sentence child:(C {<true>}) terminator:<Id.Op_Semi _>)] ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {(DQ (${ Id.VSub_Name watchAge))} {<Id.Lit_Equals '='> <Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name watchAgePrev))} {<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: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<isodate>}) ) } spids: [676] ) ] ) (C {<echo>} { (DQ <'building '> (${ Id.VSub_Name VERSIONS_OS_NAME) <-> (${ Id.VSub_Name VERSIONS_OS_RELEASE) <' @ '> (${ Id.VSub_Name date) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:outputFileDated) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name FLAGS_output) <-> (${ Id.VSub_Name date))} spids: [702] ) ] ) (command.Simple words: [{(${ Id.VSub_Name FLAGS_command)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: { (DQ (${ Id.VSub_Name FLAGS_output_dir) <'/'> (${ Id.VSub_Name outputFileDated) ) } ) (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] do_fork: T ) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<cd>} {(DQ (${ Id.VSub_Name FLAGS_output_dir))}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<rm>} {<-f>} {(DQ (${ Id.VSub_Name FLAGS_output))}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<ln>} {<-s>} {(DQ (${ Id.VSub_Name outputFileDated))} {(DQ (${ Id.VSub_Name FLAGS_output))} ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<grep>} {<FAIL>} {(DQ (${ Id.VSub_Name FLAGS_output))}) terminator: <Id.Op_Semi _> ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:watchAgePrev) op: assign_op.Equal rhs: {(${ Id.VSub_Name watchAge)} spids: [791] ) ] ) ] spids: [649 673] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:watchAge) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<age>} {(DQ (${ Id.VSub_Name FLAGS_watch))}) ) } spids: [801] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name watchAge))} {<Id.Lit_Equals '='> <Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name watchAgePrev))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {(SQ <sleeping...>)}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name watchAge))} {<Id.Lit_Equals '='> <Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name watchAgePrev))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (C {<sleep>} {(${ Id.VSub_Name FLAGS_pause)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:watchAge) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<age>} {(DQ (${ Id.VSub_Name FLAGS_watch))}) ) } spids: [879] ) ] ) ] ) ) ] spids: [815 837] ) ] ) ] ) ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:argv0) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(DQ (${ Id.VSub_Name ARGV0))}) (C {<sed>} {(SQ <'s/_test$//;s/_test\\.sh$//'>)}) ] negated: F ) ) } spids: [907] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name ARGV0))} {<Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name argv0))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<FLAGS>} {(DQ ($ Id.VSub_At '$@'))}) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_QMark '$?')} ) ] ) (C {<eval>} {<set>} {<-->} {(DQ (${ Id.VSub_Name FLAGS_ARGV))}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-gt>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (C {<main>} {(DQ ($ Id.VSub_At '$@'))}) terminator: <Id.Op_Semi _> ) ] spids: [979 992] ) ] else_action: [(command.Sentence child:(C {<main>}) terminator:<Id.Op_Semi _>)] ) ] spids: [929 950] ) ] ) ] )