(command.CommandList children: [ (C {(KW_Set set)} {(-o)} {(nounset)}) (C {(KW_Set set)} {(-o)} {(pipefail)}) (C {(KW_Set set)} {(-o)} {(errexit)}) (C {(readonly)} {(Lit_VarLike 'THIS_DIR=') (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(cd)} { (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [(C {(dirname)} {($ VSub_Number '$0')})] ) ) } ) (C {(pwd)}) ] ) ] ) ) } ) (C {(source)} {($ VSub_DollarName '$THIS_DIR') (/common.sh)}) (C {(readonly)} {(Lit_VarLike 'REPO_ROOT=') (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.AndOr ops: [Op_DAmp] children: [(C {(cd)} {($ VSub_DollarName '$THIS_DIR') (/..)}) (C {(pwd)})] ) ] ) ) } ) (command.ShFunction name: _all-py-files body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'fmt=') ($ VSub_Number '$1')}) (C {(oil-python-sources)} {($ VSub_DollarName '$REPO_ROOT')} {(DQ ($ VSub_DollarName '$fmt'))} ) (C {(cat)} {($ VSub_DollarName '$REPO_ROOT') (/_build/py-to-compile.txt)} (word.BracedTree parts: [ ($ VSub_DollarName '$REPO_ROOT') (/_build/) (word_part.BracedTuple words:[{(oil)} {(opy)}]) (/py-to-compile.txt) ] ) ) ] ) ) (command.ShFunction name: all-py-files body: (command.BraceGroup children: [ (command.Pipeline children: [(C {(_all-py-files)} {(DQ ($ VSub_At '$@'))}) (C {(sort)}) (C {(uniq)})] negated: F ) ] ) ) (command.ShFunction name: _copy body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'dest_dir=') ($ VSub_Number '$1')}) (C {(local)} {(Lit_VarLike 'src_path=') ($ VSub_Number '$2')}) (C {(local)} {(Lit_VarLike 'dest_rel_path=') ($ VSub_Number '$3')}) (C {(local)} {(Lit_VarLike 'dest=') ($ VSub_DollarName '$dest_dir') (/) ($ VSub_DollarName '$dest_rel_path') } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dest) op: Equal rhs: { (braced_var_sub token: <VSub_Name dest> suffix_op: (suffix_op.Unary op_id:VOp1_Percent arg_word:{(c)}) ) } ) ] ) (C {(mkdir)} {(-p)} { (command_sub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [(C {(dirname)} {($ VSub_DollarName '$dest')})] ) ) } ) (C {(cp)} {(-v)} {(--no-target-directory)} {($ VSub_DollarName '$src_path')} {($ VSub_DollarName '$dest')} ) ] ) ) (command.ShFunction name: import body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'dest=') (_regtest/src)}) (C {(mkdir)} {(-p)} {($ VSub_DollarName '$dest')}) (command.Pipeline children: [ (C {(all-py-files)} {(SQ <'%p %P\\n'>)}) (C {(xargs)} {(-n)} {(2)} {(--)} {($ VSub_Number '$0')} {(_copy)} {($ VSub_DollarName '$dest')} ) ] negated: F ) ] ) ) (command.ShFunction name: manifest body: (command.BraceGroup children: [ (C {(find)} {(_regtest/src)} {(-type)} {(f)} {(-a)} {(-printf)} {(SQ <'%p %Pc\\n'>)}) ] ) ) (command.ShFunction name: compile body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'pat=') (braced_var_sub token: <VSub_Number 1> suffix_op: (suffix_op.Unary op_id:VTest_ColonHyphen arg_word:{}) ) } ) (C {(local)} {(Lit_VarLike 'dest=') (_tmp/regtest)}) (C {(mkdir)} {(-p)} {($ VSub_DollarName '$dest')}) (command.TimeBlock pipeline: (command.Pipeline children: [ (C {(manifest)}) (C {(egrep)} {(DQ ($ VSub_DollarName '$pat'))}) (C {(./build.sh)} {(compile-manifest)} {($ VSub_DollarName '$dest')}) ] negated: F ) ) ] ) ) (command.ShFunction name: checksum body: (command.BraceGroup children: [ (command.Pipeline children: [ (C {(find)} {(_tmp/regtest)} {(-type)} {(f)}) (C {(xargs)} {($ VSub_DollarName '$THIS_DIR') (/../bin/opyc)} {(dis-md5)}) (C {(sort)} {(-n)}) ] negated: F ) ] ) ) (command.ShFunction name: verify-golden body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(checksum)}) (C {(diff)} {(-u)} {(_regtest/dis-md5.golden.txt)} {(-)}) ] negated: F ) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(OK)})] ) ] else_action: [(command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})] ) ] ) ) (command.ShFunction name: lines body: (command.BraceGroup children: [ (command.Pipeline children: [ (C {(find)} {(_regtest/src)} {(-type)} {(f)}) (C {(xargs)} {(wc)} {(-l)}) (C {(sort)} {(-n)}) ] negated: F ) ] ) ) (command.ShFunction name: compare-one body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'rel_path=') (SQ <opy/compiler2/transformer.pyc>)}) (C {(ls)} {(-l)} {(_tmp/regtest/) ($ VSub_DollarName '$rel_path')}) (command.Pipeline children: [ (C {(unzip)} {(-p)} {($ VSub_DollarName '$rel_path')} {(_tmp/flanders/bytecode-opy.zip)}) (C {(od)} {(-c)}) ] negated: F ) ] ) ) (command.ShFunction name: smoke-three-modes body: (command.BraceGroup children: [ (C {(compile)} {(oil)}) (C {($ VSub_DollarName '$THIS_DIR') (/../bin/opyc)} {(eval)} {(SQ <'1+2*3'>)}) (command.Pipeline children: [ (C {(echo)} {(SQ <'4+5*6'>)}) (C {($ VSub_DollarName '$THIS_DIR') (/../bin/opyc)} {(repl)}) ] negated: F ) ] ) ) (C {(DQ ($ VSub_At '$@'))}) ] )