(command.CommandList children: [ (C {(Id.KW_Set set)} {(-o)} {(nounset)}) (C {(Id.KW_Set set)} {(-o)} {(pipefail)}) (C {(Id.KW_Set set)} {(-o)} {(errexit)}) (C {(source)} {(build/common.sh)}) (C {(source)} {(benchmarks/common.sh)}) (command.ShFunction name: _dump-if-exists body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'path=') ($ Id.VSub_Number '$1')}) (C {(local)} {(Id.Lit_VarLike 'out=') ($ Id.VSub_Number '$2')}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(-f)} {($ Id.VSub_DollarName '$path')}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:194) ) ] ) (command.Simple words: [{(cat)} {($ Id.VSub_DollarName '$path')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:201) fd: -1 arg_word: {($ Id.VSub_DollarName '$out')} ) ] ) ] ) ) (command.ShFunction name: dump-shell-id body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'sh=') ($ Id.VSub_Number '$1')}) (C {(local)} {(name)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:name) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:241) command_list: (command.CommandList children: [(C {(basename)} {($ Id.VSub_DollarName '$sh')})] ) ) } spids: [240] ) ] ) (C {(local)} {(Id.Lit_VarLike 'out_dir=') (braced_var_sub token: (Token id:Id.VSub_Number val:2 span_id:253) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(_tmp) (Id.Lit_Slash /) (shell-id) (Id.Lit_Slash /) ($ Id.VSub_DollarName '$name') } ) ) } ) (C {(mkdir)} {(-p)} {($ Id.VSub_DollarName '$out_dir')}) (command.Case to_match: {($ Id.VSub_DollarName '$sh')} arms: [ (case_arm pat_list: [{(Id.Lit_Star '*') (/osh)}] action: [ (C {(local)} {(branch)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:branch) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:293) command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {(--abbrev-ref)} {(HEAD)})] ) ) } spids: [292] ) ] ) (command.Simple words: [{(echo)} {($ Id.VSub_DollarName '$branch')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:308) fd: -1 arg_word: {($ Id.VSub_DollarName '$out_dir') (/git-branch.txt)} ) ] ) (command.Simple words: [{(git)} {(rev-parse)} {($ Id.VSub_DollarName '$branch')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:320) fd: -1 arg_word: {($ Id.VSub_DollarName '$out_dir') (/git-commit-hash.txt)} ) ] ) ] spids: [282 284 326 -1] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$name')} arms: [ (case_arm pat_list: [{(bash)} {(zsh)}] action: [ (command.Simple words: [{($ Id.VSub_DollarName '$sh')} {(--version)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:350) fd: -1 arg_word: {($ Id.VSub_DollarName '$out_dir') (/version.txt)} ) ] ) ] spids: [340 343 356 -1] ) (case_arm pat_list: [{(osh)}] action: [ (command.Simple words: [{($ Id.VSub_DollarName '$sh')} {(--version)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:367) fd: -1 arg_word: {($ Id.VSub_DollarName '$out_dir') (/osh-version.txt)} ) ] ) ] spids: [359 360 373 -1] ) (case_arm pat_list: [{(dash)} {(mksh)}] action: [ (command.Simple words: [{(dpkg)} {(-s)} {($ Id.VSub_DollarName '$name')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:392) fd: -1 arg_word: {($ Id.VSub_DollarName '$out_dir') (/dpkg-version.txt)} ) ] ) ] spids: [376 379 398 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [(C {(die)} {(DQ ("Invalid shell '") ($ Id.VSub_DollarName '$name') ("'"))})] spids: [401 402 414 -1] ) ] ) ] ) ) (command.ShFunction name: _shell-id-hash body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'src=') ($ Id.VSub_Number '$1')}) (C {(local)} {(file)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:file) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$src') (/version.txt)} spids: [442] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-f)} {($ Id.VSub_DollarName '$file')}) (C {(cat)} {($ Id.VSub_DollarName '$file')}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:file) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$src') (/dpkg-version.txt)} spids: [465] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-f)} {($ Id.VSub_DollarName '$file')}) (C {(egrep)} {(SQ (Token id:Id.Lit_Chars val:'^Version' span_id:481))} {($ Id.VSub_DollarName '$file')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:file) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$src') (/osh-version.txt)} spids: [492] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-f)} {($ Id.VSub_DollarName '$file')}) (C {(egrep)} {(SQ (Token id:Id.Lit_Chars val:'^Oil version|^Interpreter' span_id:508))} {($ Id.VSub_DollarName '$file')} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:file) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$src') (/git-commit-hash.txt)} spids: [519] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-f)} {($ Id.VSub_DollarName '$file')}) (C {(cat)} {($ Id.VSub_DollarName '$file')}) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:538) arg_word: {(0)} ) ] ) ) (command.ShFunction name: publish-shell-id body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'src=') ($ Id.VSub_Number '$1')}) (C {(local)} {(Id.Lit_VarLike 'dest_base=') (braced_var_sub token: (Token id:Id.VSub_Number val:2 span_id:568) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(..) (Id.Lit_Slash /) (benchmark-data) (Id.Lit_Slash /) (shell-id)} ) ) } ) (C {(local)} {(Id.Lit_VarLike 'name=') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:582) command_list: (command.CommandList children: [(C {(basename)} {($ Id.VSub_DollarName '$src')})] ) ) } ) (C {(local)} {(hash)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:hash) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:604) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(_shell-id-hash)} {($ Id.VSub_DollarName '$src')}) (C {(md5sum)}) ] negated: F ) ] ) ) } spids: [603] ) ] ) (C {(local)} {(Id.Lit_VarLike 'id=') (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:hash span_id:624) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) length: (arith_expr.ArithWord w:{(Id.Lit_Digits 8)}) ) ) ) } ) (C {(local)} {(Id.Lit_VarLike 'dest=') (DQ ($ Id.VSub_DollarName '$dest_base') (/) ($ Id.VSub_DollarName '$name') (-) ($ Id.VSub_DollarName '$id') ) } ) (C {(mkdir)} {(-p)} {($ Id.VSub_DollarName '$dest')}) (C {(cp)} {(--no-target-directory)} {(--recursive)} {($ Id.VSub_DollarName '$src') (/)} {($ Id.VSub_DollarName '$dest') (/)} ) (command.Simple words: [{(echo)} {($ Id.VSub_DollarName '$hash')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:671) fd: -1 arg_word: {($ Id.VSub_DollarName '$dest') (/HASH.txt)} ) ] ) (C {(log)} {(DQ ('Published shell ID to ') ($ Id.VSub_DollarName '$dest'))}) (C {(echo)} {($ Id.VSub_DollarName '$id')}) ] ) ) (command.ShFunction name: dump-host-id body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'out_dir=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:736) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(_tmp) (Id.Lit_Slash /) (host-id) (Id.Lit_Slash /) (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:742) command_list: (command.CommandList children:[(C {(hostname)})]) ) } ) ) } ) (C {(mkdir)} {(-p)} {($ Id.VSub_DollarName '$out_dir')}) (command.Simple words: [{(hostname)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:759) fd: -1 arg_word: {($ Id.VSub_DollarName '$out_dir') (/hostname.txt)} ) ] ) (command.Simple words: [{(uname)} {(-m)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:786) fd: -1 arg_word: {($ Id.VSub_DollarName '$out_dir') (/machine.txt)} ) ] ) (command.BraceGroup children: [(C {(uname)} {(--kernel-release)}) (C {(uname)} {(--kernel-version)})] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:811) fd: -1 arg_word: {($ Id.VSub_DollarName '$out_dir') (/kernel.txt)} ) ] ) (C {(_dump-if-exists)} {(/etc/lsb-release)} {($ Id.VSub_DollarName '$out_dir') (/lsb-release.txt)} ) (command.Simple words: [{(cat)} {(/proc/cpuinfo)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:831) fd: -1 arg_word: {($ Id.VSub_DollarName '$out_dir') (/cpuinfo.txt)} ) ] ) (command.Simple words: [{(cat)} {(/proc/meminfo)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:849) fd: -1 arg_word: {($ Id.VSub_DollarName '$out_dir') (/meminfo.txt)} ) ] ) ] ) ) (command.ShFunction name: _host-id-hash body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'src=') ($ Id.VSub_Number '$1')}) (C {(cat)} {($ Id.VSub_DollarName '$src') (/machine.txt)}) (C {(cat)} {($ Id.VSub_DollarName '$src') (/kernel.txt)}) (C {(local)} {(Id.Lit_VarLike 'file=') ($ Id.VSub_DollarName '$src') (/lsb-release.txt)}) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-f)} {($ Id.VSub_DollarName '$file')}) (C {(cat)} {($ Id.VSub_DollarName '$file')}) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:940) arg_word: {(0)} ) ] ) ) (command.ShFunction name: publish-host-id body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'src=') ($ Id.VSub_Number '$1')}) (C {(local)} {(Id.Lit_VarLike 'dest_base=') (braced_var_sub token: (Token id:Id.VSub_Number val:2 span_id:970) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(..) (Id.Lit_Slash /) (benchmark-data) (Id.Lit_Slash /) (host-id)} ) ) } ) (C {(local)} {(Id.Lit_VarLike 'name=') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:984) command_list: (command.CommandList children: [(C {(basename)} {($ Id.VSub_DollarName '$src')})] ) ) } ) (C {(local)} {(hash)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:hash) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:997) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(_host-id-hash)} {($ Id.VSub_DollarName '$src')}) (C {(md5sum)}) ] negated: F ) ] ) ) } spids: [996] ) ] ) (C {(local)} {(Id.Lit_VarLike 'id=') (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:hash span_id:1017) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) length: (arith_expr.ArithWord w:{(Id.Lit_Digits 8)}) ) ) ) } ) (C {(local)} {(Id.Lit_VarLike 'dest=') (DQ ($ Id.VSub_DollarName '$dest_base') (/) ($ Id.VSub_DollarName '$name') (-) ($ Id.VSub_DollarName '$id') ) } ) (C {(mkdir)} {(-p)} {($ Id.VSub_DollarName '$dest')}) (C {(cp)} {(--no-target-directory)} {(--recursive)} {($ Id.VSub_DollarName '$src') (/)} {($ Id.VSub_DollarName '$dest') (/)} ) (command.Simple words: [{(echo)} {($ Id.VSub_DollarName '$hash')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1064) fd: -1 arg_word: {($ Id.VSub_DollarName '$dest') (/HASH.txt)} ) ] ) (C {(log)} {(DQ ('Published host ID to ') ($ Id.VSub_DollarName '$dest'))}) (C {(echo)} {($ Id.VSub_DollarName '$id')}) ] ) ) (command.ShFunction name: dump-compiler-id body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'cc=') ($ Id.VSub_Number '$1')}) (C {(local)} {(Id.Lit_VarLike 'out_dir=') (braced_var_sub token: (Token id:Id.VSub_Number val:2 span_id:1121) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(_tmp) (Id.Lit_Slash /) (compiler-id) (Id.Lit_Slash /) (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1127) command_list: (command.CommandList children: [(C {(basename)} {($ Id.VSub_DollarName '$cc')})] ) ) } ) ) } ) (C {(mkdir)} {(-p)} {($ Id.VSub_DollarName '$out_dir')}) (command.Case to_match: {($ Id.VSub_DollarName '$cc')} arms: [ (case_arm pat_list: [{(Id.Lit_Star '*') (/gcc)}] action: [(C {($ Id.VSub_DollarName '$cc')} {(--version)})] spids: [1151 1153 1165 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*') (/clang)}] action: [(C {($ Id.VSub_DollarName '$cc')} {(--version)})] spids: [1168 1170 1182 -1] ) ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1187) fd: -1 arg_word: {($ Id.VSub_DollarName '$out_dir') (/version.txt)} ) ] ) ] ) ) (command.ShFunction name: test-compiler-id body: (command.BraceGroup children: [ (C {(dump-compiler-id)} {(gcc)}) (C {(dump-compiler-id)} {($ Id.VSub_DollarName '$CLANG')}) (C {(head)} {(_tmp/compiler-id/) (Id.Lit_Star '*') (/version.txt)}) ] ) ) (command.ShFunction name: _compiler-id-hash body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'src=') ($ Id.VSub_Number '$1')}) (command.Pipeline children: [ (C {(cat)} {($ Id.VSub_DollarName '$src') (/version.txt)}) (C {(grep)} {(-v)} {(InstalledDir)}) ] negated: F ) ] ) ) (command.ShFunction name: publish-compiler-id body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'src=') ($ Id.VSub_Number '$1')}) (C {(local)} {(Id.Lit_VarLike 'dest_base=') (braced_var_sub token: (Token id:Id.VSub_Number val:2 span_id:1279) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(..) (Id.Lit_Slash /) (benchmark-data) (Id.Lit_Slash /) (compiler-id)} ) ) } ) (C {(local)} {(Id.Lit_VarLike 'name=') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1293) command_list: (command.CommandList children: [(C {(basename)} {($ Id.VSub_DollarName '$src')})] ) ) } ) (C {(local)} {(hash)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:hash) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1306) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(_compiler-id-hash)} {($ Id.VSub_DollarName '$src')}) (C {(md5sum)}) ] negated: F ) ] ) ) } spids: [1305] ) ] ) (C {(local)} {(Id.Lit_VarLike 'id=') (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:hash span_id:1326) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) length: (arith_expr.ArithWord w:{(Id.Lit_Digits 8)}) ) ) ) } ) (C {(local)} {(Id.Lit_VarLike 'dest=') (DQ ($ Id.VSub_DollarName '$dest_base') (/) ($ Id.VSub_DollarName '$name') (-) ($ Id.VSub_DollarName '$id') ) } ) (C {(mkdir)} {(-p)} {($ Id.VSub_DollarName '$dest')}) (C {(cp)} {(--no-target-directory)} {(--recursive)} {($ Id.VSub_DollarName '$src') (/)} {($ Id.VSub_DollarName '$dest') (/)} ) (command.Simple words: [{(echo)} {($ Id.VSub_DollarName '$hash')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1373) fd: -1 arg_word: {($ Id.VSub_DollarName '$dest') (/HASH.txt)} ) ] ) (C {(log)} {(DQ ('Published compiler ID to ') ($ Id.VSub_DollarName '$dest'))}) (C {(echo)} {($ Id.VSub_DollarName '$id')}) ] ) ) (command.ShFunction name: shell-provenance body: (command.BraceGroup children: [ (C {(local)} {(job_id)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:job_id) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1442) command_list: (command.CommandList children: [ (C {(date)} {(Id.Lit_Other '+') (Id.Lit_Other '%') (Y-) (Id.Lit_Other '%') (m-) (Id.Lit_Other '%') (d__) (Id.Lit_Other '%') (H-) (Id.Lit_Other '%') (M-) (Id.Lit_Other '%') (S) } ) ] ) ) ) } spids: [1440] ) ] ) (C {(local)} {(host)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:host) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1468) command_list: (command.CommandList children:[(C {(hostname)})]) ) } spids: [1467] ) ] ) (C {(local)} {(Id.Lit_VarLike 'out=') (_tmp/) (${ Id.VSub_Name host) (.) (${ Id.VSub_Name job_id) (.provenance.txt) } ) (C {(local)} {(Id.Lit_VarLike 'tmp_dir=') (_tmp/host-id/) ($ Id.VSub_DollarName '$host')}) (C {(dump-host-id)} {($ Id.VSub_DollarName '$tmp_dir')}) (C {(local)} {(host_hash)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:host_hash) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1512) command_list: (command.CommandList children: [(C {(publish-host-id)} {($ Id.VSub_DollarName '$tmp_dir')})] ) ) } spids: [1511] ) ] ) (C {(local)} {(shell_hash)}) (command.ForEach iter_name: sh_path iter_words: [ {(bash)} {(dash)} {(mksh)} {(zsh)} {(bin/osh)} {($ Id.VSub_DollarName '$OSH_OVM')} ] do_arg_iter: F body: (command.DoGroup children: [ (C {(local)} {(Id.Lit_VarLike 'name=') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1555) command_list: (command.CommandList children: [(C {(basename)} {($ Id.VSub_DollarName '$sh_path')})] ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmp_dir) op: assign_op.Equal rhs: {(_tmp/shell-id/) ($ Id.VSub_DollarName '$name')} spids: [1563] ) ] ) (C {(dump-shell-id)} {($ Id.VSub_DollarName '$sh_path')} {($ Id.VSub_DollarName '$tmp_dir')} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:shell_hash) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1577) command_list: (command.CommandList children: [ (C {(publish-shell-id)} {($ Id.VSub_DollarName '$tmp_dir')}) ] ) ) } spids: [1576] ) ] ) (C {(echo)} { (DQ ($ Id.VSub_DollarName '$job_id') (' ') ($ Id.VSub_DollarName '$host') (' ') ($ Id.VSub_DollarName '$host_hash') (' ') ($ Id.VSub_DollarName '$sh_path') (' ') ($ Id.VSub_DollarName '$shell_hash') ) } ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1602) fd: -1 arg_word: {($ Id.VSub_DollarName '$out')} ) ] ) (C {(log)} {(DQ ('Wrote ') ($ Id.VSub_DollarName '$out'))}) (C {(echo)} {($ Id.VSub_DollarName '$out')}) ] ) ) (command.ShFunction name: compiler-provenance body: (command.BraceGroup children: [ (C {(local)} {(job_id)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:job_id) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1642) command_list: (command.CommandList children: [ (C {(date)} {(Id.Lit_Other '+') (Id.Lit_Other '%') (Y-) (Id.Lit_Other '%') (m-) (Id.Lit_Other '%') (d__) (Id.Lit_Other '%') (H-) (Id.Lit_Other '%') (M-) (Id.Lit_Other '%') (S) } ) ] ) ) ) } spids: [1640] ) ] ) (C {(local)} {(host)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:host) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1668) command_list: (command.CommandList children:[(C {(hostname)})]) ) } spids: [1667] ) ] ) (C {(local)} {(Id.Lit_VarLike 'out=') (_tmp/) (${ Id.VSub_Name host) (.) (${ Id.VSub_Name job_id) (.compiler-provenance.txt) } ) (C {(local)} {(Id.Lit_VarLike 'tmp_dir=') (_tmp/host-id/) ($ Id.VSub_DollarName '$host')}) (C {(dump-host-id)} {($ Id.VSub_DollarName '$tmp_dir')}) (C {(local)} {(host_hash)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:host_hash) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1712) command_list: (command.CommandList children: [(C {(publish-host-id)} {($ Id.VSub_DollarName '$tmp_dir')})] ) ) } spids: [1711] ) ] ) (C {(local)} {(compiler_hash)}) (command.ForEach iter_name: compiler_path iter_words: [ { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1736) command_list: (command.CommandList children:[(C {(which)} {(gcc)})]) ) } {($ Id.VSub_DollarName '$CLANG')} ] do_arg_iter: F body: (command.DoGroup children: [ (C {(local)} {(Id.Lit_VarLike 'name=') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1751) command_list: (command.CommandList children: [(C {(basename)} {($ Id.VSub_DollarName '$compiler_path')})] ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmp_dir) op: assign_op.Equal rhs: {(_tmp/compiler-id/) ($ Id.VSub_DollarName '$name')} spids: [1759] ) ] ) (C {(dump-compiler-id)} {($ Id.VSub_DollarName '$compiler_path')} {($ Id.VSub_DollarName '$tmp_dir')} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:compiler_hash) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1773) command_list: (command.CommandList children: [ (C {(publish-compiler-id)} {($ Id.VSub_DollarName '$tmp_dir')}) ] ) ) } spids: [1772] ) ] ) (C {(echo)} { (DQ ($ Id.VSub_DollarName '$job_id') (' ') ($ Id.VSub_DollarName '$host') (' ') ($ Id.VSub_DollarName '$host_hash') (' ') ($ Id.VSub_DollarName '$compiler_path') (' ') ($ Id.VSub_DollarName '$compiler_hash') ) } ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1798) fd: -1 arg_word: {($ Id.VSub_DollarName '$out')} ) ] ) (C {(log)} {(DQ ('Wrote ') ($ Id.VSub_DollarName '$out'))}) (C {(echo)} {($ Id.VSub_DollarName '$out')}) ] ) ) (C {(DQ ($ Id.VSub_At '$@'))}) ] )