(command.CommandList children: [ (C {(Id.Lit_Other ':')} { (braced_var_sub token: (Token id:Id.VSub_Name val:srcdir span_id:55) suffix_op: (suffix_op.Unary op_id:Id.VTest_Equals arg_word:{(.)}) ) } ) (command.CommandList children: [ (command.Sentence child: (C {(.)} {(DQ ($ Id.VSub_DollarName '$srcdir') (/init.sh))}) terminator: (Token id:Id.Op_Semi val:';' span_id:66) ) (C {(path_prepend_)} {(.)}) ] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:fail) op:assign_op.Equal rhs:{(0)} spids:[73])] ) (command.ShFunction name: test_compare body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(touch)} {(empty)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fail) op: assign_op.Equal rhs: {(1)} spids: [90] ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(echo)} {(xyz)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:98) fd: -1 arg_word: {(Id.KW_In in)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fail) op: assign_op.Equal rhs: {(1)} spids: [104] ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(compare)} {(/dev/null)} {(/dev/null)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:115) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:118) fd: 2 arg_word: {(err)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fail) op: assign_op.Equal rhs: {(1)} spids: [123] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-s)} {(out)}) (C {(fail_)} { (DQ ('out not empty: ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:139) command_list: (command.CommandList children:[(C {(cat)} {(out)})]) ) ) } ) ] ) (command.Case to_match: {($ Id.VSub_Hyphen '$-')} arms: [ (case_arm pat_list: [{(Id.Lit_Star '*') (x) (Id.Lit_Star '*')}] spids: [157 160 162 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-s)} {(err)}) (C {(fail_)} { (DQ ('err not empty: ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:179) command_list: (command.CommandList children:[(C {(cat)} {(err)})]) ) ) } ) ] ) ] spids: [164 165 185 -1] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(compare)} {(/dev/null)} {(empty)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:197) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:200) fd: 2 arg_word: {(err)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fail) op: assign_op.Equal rhs: {(1)} spids: [205] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-s)} {(out)}) (C {(fail_)} { (DQ ('out not empty: ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:221) command_list: (command.CommandList children:[(C {(cat)} {(out)})]) ) ) } ) ] ) (command.Case to_match: {($ Id.VSub_Hyphen '$-')} arms: [ (case_arm pat_list: [{(Id.Lit_Star '*') (x) (Id.Lit_Star '*')}] spids: [235 238 240 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-s)} {(err)}) (C {(fail_)} { (DQ ('err not empty: ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:257) command_list: (command.CommandList children:[(C {(cat)} {(err)})]) ) ) } ) ] ) ] spids: [242 243 263 -1] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{(compare)} {(Id.KW_In in)} {(Id.KW_In in)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:275) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:278) fd: 2 arg_word: {(err)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fail) op: assign_op.Equal rhs: {(1)} spids: [283] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-s)} {(out)}) (C {(fail_)} { (DQ ('out not empty: ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:299) command_list: (command.CommandList children:[(C {(cat)} {(out)})]) ) ) } ) ] ) (command.Case to_match: {($ Id.VSub_Hyphen '$-')} arms: [ (case_arm pat_list: [{(Id.Lit_Star '*') (x) (Id.Lit_Star '*')}] spids: [313 316 318 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-s)} {(err)}) (C {(fail_)} { (DQ ('err not empty: ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:335) command_list: (command.CommandList children:[(C {(cat)} {(err)})]) ) ) } ) ] ) ] spids: [320 321 341 -1] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{(compare)} {(/dev/null)} {(Id.KW_In in)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:353) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:356) fd: 2 arg_word: {(err)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fail) op: assign_op.Equal rhs: {(1)} spids: [361] ) ] ) ] ) (command.Simple words: [{(cat)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:367) fd: -1 here_begin: { (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\E' span_id:368) ) (OF) } here_end_span_id: 379 stdin_parts: [ ('diff -u /dev/null in\n') ('--- /dev/null\t1970-01-01\n') ('+++ in\t1970-01-01\n') ('+xyz\n') ] ) (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:371) fd: -1 arg_word: {(exp)} ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(compare)} {(exp)} {(out)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fail) op: assign_op.Equal rhs: {(1)} spids: [389] ) ] ) ] ) (command.Case to_match: {($ Id.VSub_Hyphen '$-')} arms: [ (case_arm pat_list: [{(Id.Lit_Star '*') (x) (Id.Lit_Star '*')}] spids: [399 402 404 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-s)} {(err)}) (C {(fail_)} { (DQ ('err not empty: ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:421) command_list: (command.CommandList children:[(C {(cat)} {(err)})]) ) ) } ) ] ) ] spids: [406 407 427 -1] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{(compare)} {(empty)} {(Id.KW_In in)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:439) fd: -1 arg_word: {(out)} ) (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:442) fd: 2 arg_word: {(err)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fail) op: assign_op.Equal rhs: {(1)} spids: [447] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Simple words: [{(grep)} {(Id.Lit_Other '@')} {(out)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:463) fd: -1 arg_word: {(/dev/null)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:465) ) ] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [ {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/\t.*//;/^@@/d' span_id:493))} {(out)} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:498) fd: -1 arg_word: {(k)} ) ] ) (C {(mv)} {(k)} {(out)}) ] ) (command.Simple words: [{(cat)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:513) fd: -1 here_begin: { (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\E' span_id:514) ) (OF) } here_end_span_id: 524 stdin_parts: [('--- empty\n') ('+++ in\n') ('+xyz\n')] ) (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:517) fd: -1 arg_word: {(exp)} ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(compare)} {(exp)} {(out)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fail) op: assign_op.Equal rhs: {(1)} spids: [534] ) ] ) ] ) ] spids: [455 467] ) ] ) (command.Case to_match: {($ Id.VSub_Hyphen '$-')} arms: [ (case_arm pat_list: [{(Id.Lit_Star '*') (x) (Id.Lit_Star '*')}] spids: [547 550 552 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-s)} {(err)}) (C {(fail_)} { (DQ ('err not empty: ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:569) command_list: (command.CommandList children:[(C {(cat)} {(err)})]) ) ) } ) ] ) ] spids: [554 555 575 -1] ) ] ) ] ) ) (C {(test_compare)}) (C {(Exit)} {($ Id.VSub_DollarName '$fail')}) ] )