(command.CommandList children: [ (command.ShFunction name: echo_then_sudo body: (command.BraceGroup children: [ (command.Simple words: [{(echo)} {(DQ ('About to execute privileged command: ') ($ VSub_At '$@'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(sudo)} {(-k)} {(DQ ($ VSub_At '$@'))}) ] ) ) (command.ShFunction name: fixup_debuglink body: (command.BraceGroup children: [ (command.Simple words: [{(echo)} {(DQ ('begin fixup_debuglink'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:obj) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debuglink) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:current_debuglink) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [(C {(read_debuglink)} {(DQ ($ VSub_DollarName '$obj'))})] ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:has_debuglink) op: Equal rhs: {($ VSub_QMark '$?')} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_eq left: {($ VSub_DollarName '$has_debuglink')} right: {(0)} ) ) (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_DollarName '$current_debuglink'))} right: {(DQ ($ VSub_DollarName '$debuglink'))} ) ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [ {(echo)} { (DQ ('detected that debuglink ') ($ VSub_DollarName '$debuglink_value') (' is already valid') ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_eq left: {($ VSub_DollarName '$has_debuglink')} right: {(0)} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [ {(echo)} { (DQ ('detected that debuglink ') ($ VSub_DollarName '$current_debuglink') (' needs fixing up to ') ($ VSub_DollarName '$debuglink') ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmpfile) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children:[(C {(mktemp)})]) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:saved_ug) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(stat)} {(-c)} {(DQ ('%u:%g'))} { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(readlink)} {(-f)} {(DQ ($ VSub_DollarName '$obj'))} ) ] ) ) ) } ) ] ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:saved_mode) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(stat)} {(-c)} {(DQ ('%a'))} { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(readlink)} {(-f)} {(DQ ($ VSub_DollarName '$obj'))} ) ] ) ) ) } ) ] ) ) ) } ) ] ) (command.Sentence child: (command.AndOr ops: [Op_DPipe] children: [ (command.Subshell command_list: (command.CommandList children: [ (command.AndOr ops: [Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(echo_then_sudo)} {(objcopy)} {(--remove-section)} {(.gnu_debuglink)} {(DQ ($ VSub_DollarName '$obj'))} {(DQ ($ VSub_DollarName '$tmpfile'))} ) (C {(echo_then_sudo)} {(chown)} {(DQ ($ VSub_DollarName '$saved_ug'))} {(DQ ($ VSub_DollarName '$tmpfile'))} ) (C {(echo_then_sudo)} {(chmod)} {(DQ ($ VSub_DollarName '$saved_mode'))} {(DQ ($ VSub_DollarName '$tmpfile'))} ) (C {(echo_then_sudo)} {(mv)} {(DQ ($ VSub_DollarName '$tmpfile'))} {(DQ ($ VSub_DollarName '$obj'))} ) ] ) ] ) ) (command.Simple words: [{(echo)} {(DQ ('objcopy failed'))}] redirects: [ (redir.Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) ] ) terminator: <Op_Semi ';'> ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmpfile) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children:[(C {(mktemp)})]) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:saved_ug) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(stat)} {(-c)} {(DQ ('%u:%g'))} { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(readlink)} {(-f)} {(DQ ($ VSub_DollarName '$obj'))} ) ] ) ) ) } ) ] ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:saved_mode) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(stat)} {(-c)} {(DQ ('%a'))} { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(readlink)} {(-f)} {(DQ ($ VSub_DollarName '$obj'))} ) ] ) ) ) } ) ] ) ) ) } ) ] ) (command.AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DPipe] children: [ (C {(echo_then_sudo)} {(objcopy)} {(--add-gnu-debuglink) (Lit_Equals '=') (DQ ($ VSub_DollarName '$debuglink'))} {(DQ ($ VSub_DollarName '$obj'))} {(DQ ($ VSub_DollarName '$tmpfile'))} ) (C {(echo_then_sudo)} {(chown)} {(DQ ($ VSub_DollarName '$saved_ug'))} {(DQ ($ VSub_DollarName '$tmpfile'))} ) (C {(echo_then_sudo)} {(chmod)} {(DQ ($ VSub_DollarName '$saved_mode'))} {(DQ ($ VSub_DollarName '$tmpfile'))} ) (C {(echo_then_sudo)} {(mv)} {(DQ ($ VSub_DollarName '$tmpfile'))} {(DQ ($ VSub_DollarName '$obj'))} ) (command.Simple words: [{(echo)} {(DQ (success))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (command.Simple words: [{(echo)} {(DQ ('objcopy failed'))}] redirects: [ (redir.Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) terminator: <Op_Semi ';'> ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ) ] ) ] ) ] ) ) (command.ShFunction name: contains_debug_symbols body: (command.BraceGroup children: [ (command.Pipeline children: [ (C {(objdump)} {(-h)} {(DQ ($ VSub_Number '$1'))}) (command.Simple words: [{(grep)} {(SQ <'\\.debug_info'>)}] redirects: [ (redir.Redir op:<Redir_Great '1>'> fd:1 arg_word:{(/dev/null)}) (redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)}) ] ) ] negated: F ) ] ) ) (command.ShFunction name: read_debuglink body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debuglink_info) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(objdump)} {(-h)} {(DQ ($ VSub_Number '$1'))}) (C {(grep)} {(SQ <'\\.gnu_debuglink'>)}) ] negated: F ) ] ) ) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_z child: {(DQ ($ VSub_DollarName '$debuglink_info'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [{(echo)} {(DQ ('no debuglink in ') ($ VSub_Number '$1'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debuglink_off) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$debuglink_info'))}) (C {(sed)} {(SQ <'s/^[[:blank:]]*//'>)}) (C {(tr)} {(-s)} {(SQ <'[:blank:]'>)} {(SQ <'\\t'>)}) (C {(cut)} {(-f6)}) ] negated: F ) ] ) ) ) } ) ] ) (command.Simple words: [{(echo)} {(DQ ('read debuglink_off: ') ($ VSub_DollarName '$debuglink_off'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {(DQ ($ VSub_DollarName '$debuglink_off'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debuglink_off_bytes) op: Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Plus left: (arith_expr.ArithWord w: {(Lit_Digits 0) (Lit_ArithVarLike x) ($ VSub_DollarName '$debuglink_off') } ) right: (arith_expr.ArithWord w:{(Lit_Digits 0)}) ) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_z child: {(DQ ($ VSub_DollarName '$debuglink_off_bytes'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [{(echo)} {(DQ ('bad debuglink header'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] else_action: [ (command.Pipeline children: [ (C {(od)} {(--skip-bytes) (Lit_Equals '=') (${ VSub_Name debuglink_off_bytes)} {(--string)} {(DQ ($ VSub_Number '$1'))} ) (C {(head)} {(-n1)}) (C {(sed)} {(SQ <'s/^[0-9a-f]* //'>)}) ] negated: F ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] ) ] ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) ) (command.ShFunction name: find_debug_file_for body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:file) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(readelf)} {(-wi)} {(DQ ($ VSub_DollarName '$file'))}) (command.Simple words: [{(grep)} {(-m1)} {(.)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) ] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debuglink_val) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(read_debuglink)} {(DQ ($ VSub_DollarName '$file'))}) ] ) ) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {(DQ ($ VSub_DollarName '$debuglink_val'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [ {(echo)} {(DQ ('Read debuglink val: ') ($ VSub_DollarName '$debuglink_val'))} ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:resolved_debuglink) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(resolve_debuglink)} {(DQ ($ VSub_DollarName '$file'))} {(DQ ($ VSub_DollarName '$debuglink_val'))} ) ] ) ) ) } ) ] ) (command.Simple words: [ {(echo)} { (DQ ('Resolved debuglink to: ') ($ VSub_DollarName '$resolved_debuglink') ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(echo)} {(DQ ($ VSub_DollarName '$resolved_debuglink'))}) ] ) ] else_action: [ (command.Simple words: [{(echo)} {(DQ ('No debuglink found'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(echo)} {(DQ ($ VSub_DollarName '$file'))}) ] ) ] ) ] else_action: [(C {(echo)} {(DQ ($ VSub_DollarName '$file'))})] ) ] ) ) (command.ShFunction name: readelf_debug body: (command.BraceGroup children: [ (C {(declare)} {(-a)} {(args)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:ctr) op:Equal rhs:{(1)})] ) (command.WhileUntil keyword: <KW_While while> cond: [(command.Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: args index: (arith_expr.ArithWord w:{($ VSub_DollarName '$ctr')}) ) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) (command.Sentence child: (command.AndOr ops: [Op_DPipe] children: [ (C {(shift)}) (command.ControlFlow token: <ControlFlow_Break break> ) ] ) terminator: <Op_Semi ';'> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ctr) op: Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Plus left: (arith_expr.ArithWord w:{($ VSub_DollarName '$ctr')}) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:file) op: Equal rhs: { (braced_var_sub token: <VSub_Name args> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Minus left: (arith_expr.ArithWord w:{($ VSub_DollarName '$ctr')}) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ) ) } ) ] ) (command.Simple words: [ {(echo)} { (DQ ('Slurped args: ') (braced_var_sub token: <VSub_Name args> bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.Simple words: [{(echo)} {(DQ ('Guessed file arg: ') ($ VSub_DollarName '$file'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(unset)} {(Lit_ArrayLhsOpen 'args[') (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Minus left: (arith_expr.ArithWord w:{($ VSub_DollarName '$ctr')}) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) (Lit_RBracket ']') } ) (C {(readelf)} { (braced_var_sub token: <VSub_Name args> bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) } { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [(C {(find_debug_file_for)} {(DQ ($ VSub_DollarName '$file'))})] ) ) ) } ) ] ) ) (command.ShFunction name: get_cu_info body: (command.BraceGroup children: [ (command.Pipeline children: [ (C {(readelf_debug)} {(-wi)} {(DQ ($ VSub_Number '$1'))}) (C {(grep)} {(-A7)} {(SQ <DW_TAG_compile_unit>)}) (C {(tr)} {(SQ <'\\n'>)} {(SQ <'\\f'>)}) (C {(sed)} {(SQ <'s/\\f--\\f/\\n/g'>)}) ] negated: F ) ] ) ) (command.ShFunction name: read_cu_info body: (command.BraceGroup children: [ (C {(read)} {(cu_info)}) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:ret) op:Equal rhs:{($ VSub_QMark '$?')})] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {(DQ ($ VSub_DollarName '$cu_info'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_fname) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$cu_info'))}) (C {(tr)} {(SQ <'\\f'>)} {(SQ <'\\n'>)}) (C {(grep)} {(DW_AT_name)}) (C {(head)} {(-n1)}) (C {(sed)} { (SQ < 's/.*DW_AT_name[[:blank:]]*:[[:blank:]]*\\((.*, offset: 0x[0-9a-f]*): \\)\\?\\(.*\\)/\\2/' > ) } ) (C {(sed)} {(SQ <'s/[[:blank:]]*$//'>)}) ] negated: F ) ] ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_language_fullstr) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$cu_info'))}) (C {(tr)} {(SQ <'\\f'>)} {(SQ <'\\n'>)}) (C {(grep)} {(DW_AT_language)}) (C {(head)} {(-n1)}) (C {(sed)} {(SQ <'s/.*DW_AT_language[[:blank:]]*:[[:blank:]]*//'>)} ) (C {(sed)} {(SQ <'s/[[:blank:]]*$//'>)}) ] negated: F ) ] ) ) ) } ) ] ) (command.Simple words: [{(echo)} {(DQ ('Note: found CU ') ($ VSub_DollarName '$cu_fname'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.Simple words: [{(echo)} {(DQ ('CU info is: ') ($ VSub_DollarName '$cu_info'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.Simple words: [ {(echo)} { (DQ ('language field of CU info is ') (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$cu_language_fullstr'))}) ] ) ) ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.Simple words: [ {(echo)} { (DQ ('comp_dir line of CU info is ') (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$cu_info'))}) (C {(tr)} {(SQ <'\\f'>)} {(SQ <'\\n'>)}) (C {(grep)} {(DW_AT_comp_dir)}) ] negated: F ) ] ) ) ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_compdir) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$cu_info'))}) (C {(tr)} {(SQ <'\\f'>)} {(SQ <'\\n'>)}) (C {(grep)} {(DW_AT_comp_dir)}) (C {(sed)} { (SQ < 's/.*DW_AT_comp_dir[[:blank:]]*:[[:blank:]]*\\((.*, offset: 0x[0-9a-f]*): \\)\\?\\(.*\\)/\\2/' > ) } ) (C {(sed)} {(SQ <'s/[[:blank:]]*$//'>)}) ] negated: F ) ] ) ) ) } ) ] ) (command.Simple words: [ {(echo)} {(DQ ('Note: found comp_dir ') ($ VSub_DollarName '$cu_compdir'))} ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.Case to_match: {(DQ ($ VSub_DollarName '$cu_fname'))} arms: [ (case_arm pat_list: [{(/) (Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_sourcepath) op: Equal rhs: {(DQ (${ VSub_Name cu_fname))} ) ] ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_sourcepath) op: Equal rhs: {(DQ (${ VSub_Name cu_compdir) (/) (${ VSub_Name cu_fname))} ) ] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cu_language_num) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$cu_language_fullstr'))} ) (C {(tr)} {(-s)} {(SQ <'[[:blank:]]'>)} {(SQ <'\\t'>)}) (C {(cut)} {(-f1)}) ] negated: F ) ] ) ) ) } ) ] ) ] ) ] else_action: [ (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:cu_fname) op:Equal rhs:{(DQ )})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:cu_language_fullstr) op:Equal rhs:{(DQ )})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:cu_compdir) op:Equal rhs:{(DQ )})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:cu_sourcepath) op:Equal rhs:{(DQ )})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:cu_language_num) op:Equal rhs:{(DQ )})] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_eq left: {($ VSub_DollarName '$ret')} right: {(0)} ) ) terminator: <Op_Semi ';'> ) ] action: [(command.Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] ) ] else_action: [(command.Sentence child:(C {(false)}) terminator:<Op_Semi ';'>)] ) ] ) ) (command.ShFunction name: resolve_debuglink body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:obj) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debuglink_value) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:canon_obj_path) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [(C {(readlink)} {(-f)} {(DQ ($ VSub_DollarName '$obj'))})] ) ) ) } ) ] ) (command.ForEach iter_name: candidate iter_words: [ { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [(C {(dirname)} {(DQ ($ VSub_DollarName '$canon_obj_path'))})] ) ) (/.debug/) ($ VSub_DollarName '$debuglink_value') ) } {(/usr/lib/debug) (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [(C {(dirname)} {(${ VSub_Name canon_obj_path)})] ) ) ) (/) ($ VSub_DollarName '$debuglink_value') } {(/usr/lib/debug/.build-id/) (Lit_Star '*') (/) ($ VSub_DollarName '$debuglink_value')} ] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(contains_debug_symbols)} {(DQ ($ VSub_DollarName '$candidate'))}) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [ {(echo)} { (DQ ('detected debug info within debuglink ') ($ VSub_DollarName '$debuglink_value') (' resolved at ') ($ VSub_DollarName '$candidate') ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(echo)} {(DQ ($ VSub_DollarName '$candidate'))}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] ) ] ) ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) ) (command.ShFunction name: ensure_debug_symbols body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:obj) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(contains_debug_symbols)} {(DQ ($ VSub_DollarName '$obj'))}) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [ {(echo)} {(DQ ('detected debug info within file ') ($ VSub_DollarName '$obj'))} ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(echo)} {(DQ ($ VSub_Number '$1'))}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debuglink_value) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(read_debuglink)} {(DQ ($ VSub_DollarName '$obj'))}) ] ) ) ) } ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:resolved_debuglink) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(resolve_debuglink)} {(DQ ($ VSub_DollarName '$obj'))} {(DQ ($ VSub_DollarName '$debuglink_value'))} ) ] ) ) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {(DQ ($ VSub_DollarName '$resolved_debuglink'))} ) ) (C {(contains_debug_symbols)} {(DQ ($ VSub_DollarName '$resolved_debuglink'))} ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [ {(echo)} { (DQ ('detected debug info within debuglink ') ($ VSub_DollarName '$debuglink_value') (' resolved at ') ($ VSub_DollarName '$candidate') ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (C {(echo)} {(DQ ($ VSub_DollarName '$candidate'))}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] ) ] ) ] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:success_attempt) op:Equal rhs:{(DQ )})] ) (command.ForEach iter_name: attempt iter_words: [ {(/usr/lib/debug) (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [(C {(readlink)} {(-f)} {(DQ ($ VSub_DollarName '$obj'))})] ) ) ) } {(/usr/lib/debug) (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(dirname)} { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(readlink)} {(-f)} {(DQ ($ VSub_DollarName '$obj'))}) ] ) ) ) } ) ] ) ) (/) (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [(C {(basename)} {(DQ ($ VSub_DollarName '$obj'))})] ) ) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.Simple words: [ {(echo)} {(DQ ('looking for a package containing ') ($ VSub_DollarName '$attempt'))} ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:apt_found) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo_then_sudo)} {(apt-file)} {(-F)} {(find)} {(DQ ($ VSub_DollarName '$attempt'))} ) (C {(sed)} {(SQ <'s^: /.*^^'>)}) ] negated: F ) ] ) ) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {(DQ ($ VSub_DollarName '$apt_found'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pkg) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$apt_found'))}) (C {(cut)} {(-f1)}) ] negated: F ) ] ) ) ) } ) ] ) (command.Simple words: [{(echo)} {(DQ ('found ') ($ VSub_DollarName '$pkg'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_n child: {(DQ ($ VSub_DollarName '$pkg'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Simple words: [ {(dpkg)} {(-p)} {(DQ ($ VSub_DollarName '$pkg'))} ] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) (redir.Redir op: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [ {(echo)} { (DQ ($ VSub_DollarName '$pkg') (' is already installed') ) } ] redirects: [ (redir.Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) ] ) ] else_action: [ (command.Simple words: [ {(echo)} { (DQ ('Attempting install of ') ($ VSub_DollarName '$pkg') ) } ] redirects: [ (redir.Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(echo_then_sudo)} {(apt-get)} {(install)} {(DQ ($ VSub_DollarName '$pkg'))} ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [{(echo)} {(DQ ('install failed'))}] redirects: [ (redir.Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(contains_debug_symbols)} {(DQ ($ VSub_DollarName '$attempt'))} ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:correct_debuglink) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(basename)} { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(readlink)} {(-f)} { (DQ ($ VSub_DollarName '$attempt' ) ) } ) ] ) ) ) } ) ] ) ) ) } ) ] ) (command.Simple words: [ {(echo)} { (DQ ('debuglink should say ') ($ VSub_DollarName '$correct_debuglink') ) } ] redirects: [ (redir.Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(fixup_debuglink)} {(DQ ($ VSub_DollarName '$obj'))} {(DQ ($ VSub_DollarName '$attempt'))} ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [{(echo)} {(DQ (failed))}] redirects: [ (redir.Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:verify_debuglink) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(read_debuglink)} {(DQ ($ VSub_DollarName '$obj'))} ) ] ) ) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: BoolBinary_GlobDEqual left: { (DQ ($ VSub_DollarName '$verify_debuglink' ) ) } right: { (DQ ($ VSub_DollarName '$correct_debuglink' ) ) } ) ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ($ VSub_DollarName '$attempt'))}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] else_action: [ (command.Simple words: [ {(echo)} {(DQ ('debuglink not fixed up properly'))} ] redirects: [ (redir.Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) ] else_action: [ (command.Simple words: [ {(echo)} { (DQ ('installed package unexpectedly lacked debug info') ) } ] redirects: [ (redir.Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) ] else_action: [ (command.Simple words: [{(echo)} {(DQ ('apt-file printed something strange'))}] redirects: [ (redir.Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) (command.ControlFlow token: <ControlFlow_Continue continue> ) ] ) ] ) ] else_action: [ (command.Simple words: [{(echo)} {(DQ ('package not found'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Continue continue> ) ] ) ] ) ) (command.Simple words: [{(echo)} {(DQ ('giving up'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) ) (command.ShFunction name: ensure_debug_source body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:obj) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:first_compile_unit_context) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(readelf)} {(-wi)} {(DQ ($ VSub_DollarName '$obj'))}) (C {(grep)} {(-m1)} {(-A5)} {(compile_unit)}) ] negated: F ) ] ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:compile_unit_name) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$first_compile_unit_context'))}) (C {(grep)} {(DW_AT_name)}) (C {(sed)} { (SQ < 's/.*DW_AT_name.*indirect string, offset: 0x[0-9a-f]\\+): //' > ) } ) (C {(sed)} {(SQ <'s/[[:blank:]]*$//'>)}) ] negated: F ) ] ) ) ) } ) ] ) (command.Simple words: [{(echo)} {(DQ ('extracted CU name: ') ($ VSub_DollarName '$compile_unit_name'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:comp_dir) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$first_compile_unit_context'))}) (C {(grep)} {(comp_dir)}) (C {(sed)} { (SQ < 's/.*DW_AT_comp_dir.*(indirect string, offset: 0x[0-9a-f]\\+): //' > ) } ) (C {(sed)} {(SQ <'s/[[:blank:]]*$//'>)}) ] negated: F ) ] ) ) ) } ) ] ) (command.Simple words: [ {(echo)} {(DQ ('extracted compilation directory: ') ($ VSub_DollarName '$comp_dir'))} ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_r child: {(DQ (${ VSub_Name comp_dir) (/) (${ VSub_Name compile_unit_name))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [{(echo)} {(DQ ('guessing that source does exist already'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] else_action: [ (command.Simple words: [{(echo)} {(DQ ('source does not exist already'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: BoolUnary_z child: {(DQ ($ VSub_DollarName '$DPKG_SOURCE_ROOT'))} ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DPKG_SOURCE_ROOT) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [(C {(mktemp)} {(-d)})] ) ) ) } ) ] ) ] ) ] ) (command.Simple words: [{(echo)} {(DQ ('downloading source to ') ($ VSub_DollarName '$DPKG_SOURCE_ROOT'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.Subshell command_list: (command.CommandList children: [ (C {(cd)} {(DQ ($ VSub_DollarName '$DPKG_SOURCE_ROOT'))}) (command.AndOr ops: [Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:owning_package) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(dpkg)} {(-S)} {(DQ ($ VSub_DollarName '$obj'))}) (C {(sed)} {(SQ <'s^: /.*^^'>)}) ] negated: F ) ] ) ) ) } ) ] ) (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (command.Simple words: [{(echo)} {(DQ ('failed to identify owning package'))}] redirects: [ (redir.Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) terminator: <Op_Semi ';'> ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(apt-get)} {(source)} {(DQ ($ VSub_DollarName '$owning_package'))}) (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (command.Simple words: [{(echo)} {(DQ ('failed to download source'))}] redirects: [ (redir.Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) terminator: <Op_Semi ';'> ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:source_dirname) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [(C {(ls)} {(-t)}) (C {(head)} {(-n1)})] negated: F ) ] ) ) ) } ) ] ) (command.Simple words: [ {(echo)} { (DQ ('guessing source was extracted in ') ($ VSub_DollarName '$source_dirname') ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.Case to_match: {(DQ ($ VSub_DollarName '$comp_dir'))} arms: [ (case_arm pat_list: [{(/build/buildd/) (Lit_Star '*')}] action: [ (command.Simple words: [{(echo)} {(DQ ('found a buildd build'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:source_dirname_escaped) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$source_dirname'))} ) (C {(escape_regexp_floating)}) ] negated: F ) ] ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prefix) op: Equal rhs: { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$comp_dir'))}) (C {(sed)} { (DQ ('s^') (Lit_Other '\\') ('(.*/') (${ VSub_Name source_dirname_escaped) (/) (Lit_Other '\\') (').*^') (Lit_Other '\\') ('1^') ) } ) ] negated: F ) ] ) ) ) } ) ] ) (command.Simple words: [ {(echo)} { (DQ ('calculated source path prefix ') ($ VSub_DollarName '$prefix')) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (C {(echo_then_sudo)} {(mkdir)} {(-p)} { (DQ (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(dirname)} {(DQ ($ VSub_DollarName '$prefix'))}) ] ) ) ) } ) (C {(echo_then_sudo)} {(ln)} {(-s)} {(DQ ($ VSub_DollarName '$source_dirname'))} {(DQ ($ VSub_DollarName '$prefix'))} ) (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (command.Simple words: [{(echo)} {(DQ ('failed to mkdir or symlink'))}] redirects: [ (redir.Redir op: <Redir_GreatAnd '1>&'> fd: 1 arg_word: {(2)} ) ] ) terminator: <Op_Semi ';'> ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ) ] ) (command.Simple words: [{(echo)} {(DQ (success))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (command.Simple words: [{(echo)} {(DQ ('package was built at bad source directory'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] ) ] ) ] ) ) ] ) ) ] )