(command.CommandList children: [ (C {(set)} {(-o)} {(nounset)}) (C {(set)} {(-o)} {(pipefail)}) (C {(set)} {(-o)} {(errexit)}) (command.Assignment keyword: Assign_Readonly pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:THIS_DIR) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(cd)} { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(dirname)} {($ VSub_Number '$0')})] ) left_token: <Left_DollarParen '$('> ) } ) (C {(pwd)}) ] ) ] ) left_token: <Left_DollarParen '$('> ) } ) ] ) (C {(source)} {($ VSub_DollarName '$THIS_DIR') (/common.sh)}) (C {(source)} {($ VSub_DollarName '$THIS_DIR') (/../build/common.sh)}) (command.FuncDef name: md5-manifest body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:tree) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) (C {(pushd)} {($ VSub_DollarName '$tree')}) (command.Pipeline children: [ (C {(find)} {(.)} {(-type)} {(f)}) (C {(sort)}) (C {(xargs)} {(stat)} {(--format)} {(SQ <'%s %n'>)}) (C {(tee)} {(SIZES.txt)}) ] negated: F ) (command.Pipeline children: [ (C {(find)} {(.)} {(-type)} {(f)}) (C {(sort)}) (C {(xargs)} {(md5sum)}) (C {(tee)} {(MD5.txt)}) ] negated: F ) (C {(popd)}) ] ) ) (command.FuncDef name: _compile-tree body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:src_tree) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:dest_tree) op: Equal rhs: {($ VSub_Number '$2')} ) ] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:version) op: Equal rhs: {($ VSub_Number '$3')} ) ] ) (C {(shift)} {(3)}) (C {(rm)} {(-r)} {(-f)} {($ VSub_DollarName '$dest_tree')}) (command.Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(lhs_expr.LhsName name:ext) op:Equal rhs:{(pyc)})] ) (command.ForEach iter_name: rel_path iter_words: [{(DQ ($ VSub_At '$@'))}] do_arg_iter: F body: (command.DoGroup children: [ (C {(echo)} {($ VSub_DollarName '$rel_path')}) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:dest) op: Equal rhs: {(${ VSub_Name dest_tree) (/) (word_part.BracedVarSub token: <VSub_Name rel_path> suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(.py)}) ) (.) (${ VSub_Name ext) } ) ] ) (C {(mkdir)} {(-p)} { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(dirname)} {($ VSub_DollarName '$dest')})] ) left_token: <Left_DollarParen '$('> ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {($ VSub_DollarName '$version')} {(Lit_Other '=')} {(ccompile)} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(misc/ccompile.py)} {($ VSub_DollarName '$src_tree') (/) (${ VSub_Name rel_path)} {($ VSub_DollarName '$dest')} ) ] ) (if_arm cond: [ (command.Sentence child: (C {(test)} {($ VSub_DollarName '$version')} {(Lit_Other '=')} {(opy)}) terminator: <Op_Semi ';'> ) ] action: [ (C {($ VSub_DollarName '$THIS_DIR') (/../bin/opyc)} {(compile)} {($ VSub_DollarName '$src_tree') (/) (${ VSub_Name rel_path)} {($ VSub_DollarName '$dest')} ) ] ) ] else_action: [(C {(die)} {(DQ (bad))})] ) ] ) ) (C {(tree)} {($ VSub_DollarName '$dest_tree')}) (C {(md5-manifest)} {($ VSub_DollarName '$dest_tree')}) ] ) ) (command.FuncDef name: compile-manifest body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:dest_dir) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (C {(read)} {(full_src_path)} {(rel_dest_path)}) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:dest) op: Equal rhs: {($ VSub_DollarName '$dest_dir') (/) ($ VSub_DollarName '$rel_dest_path')} ) ] ) (C {(mkdir)} {(-p)} { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(dirname)} {($ VSub_DollarName '$dest')})] ) left_token: <Left_DollarParen '$('> ) } ) (C {(log)} {(DQ (' ') ($ VSub_DollarName '$full_src_path'))}) (C {($ VSub_DollarName '$THIS_DIR') (/../bin/opyc)} {(compile)} {($ VSub_DollarName '$full_src_path')} {($ VSub_DollarName '$dest')} ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:rel_py_path) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name rel_dest_path> suffix_op: (suffix_op.StringUnary op_id:VOp1_Percent arg_word:{(.pyc)}) ) (.py) } ) ] ) (C {(echo)} {($ VSub_DollarName '$dest')} {($ VSub_DollarName '$rel_dest_path')}) (C {(echo)} {($ VSub_DollarName '$full_src_path')} {($ VSub_DollarName '$rel_py_path')} ) ] ) ) ] ) ) (command.FuncDef name: make-mains body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:dir) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 1> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonHyphen arg_word: {(_tmp) (Lit_Slash /) (oil-opy)} ) ) } ) ] ) (command.ForEach iter_name: link iter_words: [ { (DQ (word_part.BracedVarSub token: <VSub_Name OIL_SYMLINKS> bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.BraceGroup children: [ (C {(echo)} {(SQ <'#!/bin/sh'>)}) (C {(echo)} {(DQ ('main=') ($ VSub_DollarName '$link'))}) (C {(echo)} {(SQ <'exec python $(dirname $0)/oil.pyc $main "$@"'>)}) ] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_DollarName '$dir') (/bin/) ($ VSub_DollarName '$link')} ) ] ) (C {(chmod)} {(--verbose)} {(Lit_Other '+') (x)} {($ VSub_DollarName '$dir') (/bin/) ($ VSub_DollarName '$link')} ) ] ) ) ] ) ) (command.FuncDef name: _fill-oil-tree body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:dir) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 1> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonHyphen arg_word: {(_tmp) (Lit_Slash /) (repo-with-opy)} ) ) } ) ] ) (C {(cp)} {(-v)} (word.BracedWordTree parts: [(../osh/) (word_part.BracedTuple words:[{(osh)} {(types)}]) (.asdl)] ) {($ VSub_DollarName '$dir') (/osh)} ) (C {(cp)} {(-v)} {(../core/runtime.asdl)} {($ VSub_DollarName '$dir') (/core)}) (C {(cp)} {(-v)} {(../asdl/arith.asdl)} {($ VSub_DollarName '$dir') (/asdl)}) (C {(ln)} {(-v)} {(-s)} {(-f)} (word.BracedWordTree parts: [ ($ VSub_DollarName '$PWD') (/../) (word_part.BracedTuple words:[{(libc)} {(fastlex)}]) (.so) ] ) {($ VSub_DollarName '$dir')} ) (C {(ln)} {(-v)} {(-s)} {(-f)} {($ VSub_DollarName '$PWD') (/../oil-version.txt)} {($ VSub_DollarName '$dir')} ) (C {(ln)} {(-v)} {(-s)} {(-f)} {(--no-target-directory)} {($ VSub_DollarName '$PWD') (/../_build)} {($ VSub_DollarName '$dir') (/_build)} ) (C {(mkdir)} {(-v)} {(-p)} {($ VSub_DollarName '$dir') (/_tmp)}) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:stub) op: Equal rhs: {($ VSub_DollarName '$dir') (/bin/osh-byterun)} ) ] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_DollarName '$stub')} ) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(SQ <EOF>)} here_end_span_id: 735 stdin_parts: [ ('#!/bin/bash\n') ('readonly THIS_DIR=$(cd $(dirname $0) && pwd)\n') ('exec python $THIS_DIR/opy_.pyc opyc run $THIS_DIR/oil.pyc osh "$@"\n') ] ) ] ) (C {(chmod)} {(Lit_Other '+') (x)} {($ VSub_DollarName '$stub')}) ] ) ) (command.FuncDef name: oil-repo body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:repo_root) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(cd)} {($ VSub_DollarName '$THIS_DIR') (/..)}) (C {(pwd)}) ] ) ] ) left_token: <Left_DollarParen '$('> ) } ) ] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:files) op: Equal rhs: { (word_part.ArrayLiteralPart words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(oil-python-sources)} {($ VSub_DollarName '$repo_root')}) ] ) left_token: <Left_DollarParen '$('> ) } ] ) } ) ] ) (C {(_compile-tree)} {($ VSub_DollarName '$repo_root')} {(_tmp/repo-with-cpython/)} {(ccompile)} {(DQ (word_part.BracedVarSub token:<VSub_Name files> bracket_op:(bracket_op.WholeArray op_id:Lit_At)))} ) (C {(_compile-tree)} {($ VSub_DollarName '$repo_root')} {(_tmp/repo-with-opy/)} {(opy)} { (DQ (word_part.BracedVarSub token: <VSub_Name files> bracket_op: (bracket_op.WholeArray op_id:Lit_At) ) ) } ) (C {(_fill-oil-tree)} {(_tmp/repo-with-cpython)}) (C {(_fill-oil-tree)} {(_tmp/repo-with-opy)}) ] ) ) (command.FuncDef name: _oil-bin-manifest body: (command.BraceGroup children: [ (command.Pipeline children: [ (command.BraceGroup children: [ (C {(build/actions.sh)} {(runpy-py-to-compile)}) (C {(build/actions.sh)} {(py-to-compile)} {(SQ <.>)} {(SQ <bin.oil>)}) ] ) (C {(sort)}) (C {(uniq)}) ] negated: F ) ] ) ) (command.FuncDef name: oil-bin body: (command.BraceGroup children: [ (command.SimpleCommand words: [{(pushd)} {($ VSub_DollarName '$THIS_DIR') (/..)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})] ) (command.Pipeline children: [(C {(_oil-bin-manifest)}) (C {(compile-manifest)} {(_tmp/oil-with-opy)})] negated: F ) (command.SimpleCommand words: [{(popd)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})] ) ] ) ) (command.FuncDef name: _opy-bin-manifest body: (command.BraceGroup children: [(C {(build/actions.sh)} {(py-to-compile)} {(SQ <.>)} {(SQ <bin.opy_>)})] ) ) (command.FuncDef name: opy-bin body: (command.BraceGroup children: [ (command.SimpleCommand words: [{(pushd)} {(..)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})] ) (command.Pipeline children: [(C {(_opy-bin-manifest)}) (C {(compile-manifest)} {(_tmp/opy-with-opy)})] negated: F ) (command.SimpleCommand words: [{(popd)}] redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})] ) ] ) ) (C {(DQ ($ VSub_At '$@'))}) ] )