(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 {<readonly>} 
      {<Id.Lit_VarLike 'THIS_DIR='> 
        (command_sub
          left_token: <Id.Left_DollarParen '$('>
          child: 
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<cd>} 
                  {
                    (command_sub
                      left_token: <Id.Left_DollarParen '$('>
                      child: (C {<dirname>} {($ Id.VSub_Number '$0')})
                    )
                  }
                )
                (C {<pwd>})
              ]
            )
        )
      }
    )
    (C {<source>} {($ Id.VSub_DollarName '$THIS_DIR') <'/common.sh'>})
    (C {<source>} {($ Id.VSub_DollarName '$THIS_DIR') <'/../build/common.sh'>})
    (command.ShFunction
      name: md5-manifest
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'tree='> ($ Id.VSub_Number '$1')})
            (C {<pushd>} {($ Id.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.ShFunction
      name: _compile-tree
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'src_tree='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'dest_tree='> ($ Id.VSub_Number '$2')})
            (C {<local>} {<Id.Lit_VarLike 'version='> ($ Id.VSub_Number '$3')})
            (C {<shift>} {<3>})
            (C {<rm>} {<-r>} {<-f>} {($ Id.VSub_DollarName '$dest_tree')})
            (C {<local>} {<Id.Lit_VarLike 'ext='> <pyc>})
            (command.ForEach
              iter_name: rel_path
              iter_words: [{(DQ ($ Id.VSub_At '$@'))}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<echo>} {($ Id.VSub_DollarName '$rel_path')})
                    (C {<local>} 
                      {<Id.Lit_VarLike 'dest='> (${ Id.VSub_Name dest_tree) <'/'> 
                        (braced_var_sub
                          token: <Id.VSub_Name rel_path>
                          suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{<.py>})
                        ) <.> (${ Id.VSub_Name ext)
                      }
                    )
                    (C {<mkdir>} {<-p>} 
                      {
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          child: (C {<dirname>} {($ Id.VSub_DollarName '$dest')})
                        )
                      }
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<test>} {($ Id.VSub_DollarName '$version')} {<Id.Lit_Equals '='>} 
                                  {<ccompile>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<'misc/ccompile.py'>} 
                              {($ Id.VSub_DollarName '$src_tree') <'/'> (${ Id.VSub_Name rel_path)} {($ Id.VSub_DollarName '$dest')}
                            )
                          ]
                          spids: [272 283]
                        )
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<test>} {($ Id.VSub_DollarName '$version')} {<Id.Lit_Equals '='>} 
                                  {<opy>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {($ Id.VSub_DollarName '$THIS_DIR') <'/../bin/opyc'>} {<compile>} 
                              {($ Id.VSub_DollarName '$src_tree') <'/'> (${ Id.VSub_Name rel_path)} {($ Id.VSub_DollarName '$dest')}
                            )
                          ]
                          spids: [297 308]
                        )
                      ]
                      else_action: [(C {<die>} {(DQ <bad>)})]
                    )
                  ]
                )
            )
            (C {<tree>} {($ Id.VSub_DollarName '$dest_tree')})
            (C {<md5-manifest>} {($ Id.VSub_DollarName '$dest_tree')})
          ]
        )
    )
    (command.ShFunction
      name: compile-manifest
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'dest_dir='> ($ Id.VSub_Number '$1')})
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: [
                (command.Sentence
                  child: (C {<read>} {<full_src_path>} {<rel_dest_path>})
                  terminator: <Id.Op_Semi _>
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (C {<local>} 
                      {<Id.Lit_VarLike 'dest='> ($ Id.VSub_DollarName '$dest_dir') <'/'> 
                        ($ Id.VSub_DollarName '$rel_dest_path')
                      }
                    )
                    (C {<mkdir>} {<-p>} 
                      {
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          child: (C {<dirname>} {($ Id.VSub_DollarName '$dest')})
                        )
                      }
                    )
                    (C {<log>} {(DQ <'     '> ($ Id.VSub_DollarName '$full_src_path'))})
                    (C {($ Id.VSub_DollarName '$THIS_DIR') <'/../bin/opyc'>} {<compile>} 
                      {($ Id.VSub_DollarName '$full_src_path')} {($ Id.VSub_DollarName '$dest')}
                    )
                    (C {<local>} 
                      {<Id.Lit_VarLike 'rel_py_path='> 
                        (braced_var_sub
                          token: <Id.VSub_Name rel_dest_path>
                          suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{<.pyc>})
                        ) <.py>
                      }
                    )
                    (C {<echo>} {($ Id.VSub_DollarName '$dest')} 
                      {($ Id.VSub_DollarName '$rel_dest_path')}
                    )
                    (C {<echo>} {($ Id.VSub_DollarName '$full_src_path')} 
                      {($ Id.VSub_DollarName '$rel_py_path')}
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: make-mains
      body: 
        (BraceGroup
          children: [
            (C {<local>} 
              {<Id.Lit_VarLike 'dir='> 
                (braced_var_sub
                  token: <Id.VSub_Number 1>
                  suffix_op: 
                    (suffix_op.Unary
                      op_id: Id.VTest_ColonHyphen
                      arg_word: {<_tmp> <Id.Lit_Slash '/'> <oil-opy>}
                    )
                )
              }
            )
            (command.ForEach
              iter_name: link
              iter_words: [
                {
                  (DQ 
                    (braced_var_sub
                      token: <Id.VSub_Name OIL_SYMLINKS>
                      bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                    )
                  )
                }
              ]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (BraceGroup
                      children: [
                        (C {<echo>} {(SQ <'#!/bin/sh'>)})
                        (C {<echo>} {(DQ <'main='> ($ Id.VSub_DollarName '$link'))})
                        (C {<echo>} {(SQ <'exec python $(dirname $0)/oil.pyc $main "$@"'>)})
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: 
                            {($ Id.VSub_DollarName '$dir') <'/bin/'> ($ Id.VSub_DollarName '$link')}
                        )
                      ]
                    )
                    (C {<chmod>} {<--verbose>} {<Id.Lit_Other '+'> <x>} 
                      {($ Id.VSub_DollarName '$dir') <'/bin/'> ($ Id.VSub_DollarName '$link')}
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: _fill-oil-tree
      body: 
        (BraceGroup
          children: [
            (C {<local>} 
              {<Id.Lit_VarLike 'dir='> 
                (braced_var_sub
                  token: <Id.VSub_Number 1>
                  suffix_op: 
                    (suffix_op.Unary
                      op_id: Id.VTest_ColonHyphen
                      arg_word: {<_tmp> <Id.Lit_Slash '/'> <repo-with-opy>}
                    )
                )
              }
            )
            (C {<cp>} {<-v>} 
              (word.BracedTree
                parts: [<'../osh/'> (word_part.BracedTuple words:[{<osh>} {<types>}]) <.asdl>]
              ) {($ Id.VSub_DollarName '$dir') <'/osh'>}
            )
            (C {<cp>} {<-v>} {<'../core/runtime.asdl'>} {($ Id.VSub_DollarName '$dir') <'/core'>})
            (C {<cp>} {<-v>} {<'../asdl/arith.asdl'>} {($ Id.VSub_DollarName '$dir') <'/asdl'>})
            (C {<ln>} {<-v>} {<-s>} {<-f>} 
              (word.BracedTree
                parts: [
                  ($ Id.VSub_DollarName '$PWD')
                  <'/../'>
                  (word_part.BracedTuple words:[{<libc>} {<fastlex>}])
                  <.so>
                ]
              ) {($ Id.VSub_DollarName '$dir')}
            )
            (C {<ln>} {<-v>} {<-s>} {<-f>} {($ Id.VSub_DollarName '$PWD') <'/../oil-version.txt'>} 
              {($ Id.VSub_DollarName '$dir')}
            )
            (C {<ln>} {<-v>} {<-s>} {<-f>} {<--no-target-directory>} 
              {($ Id.VSub_DollarName '$PWD') <'/../_build'>} {($ Id.VSub_DollarName '$dir') <'/_build'>}
            )
            (C {<mkdir>} {<-v>} {<-p>} {($ Id.VSub_DollarName '$dir') <'/_tmp'>})
            (C {<local>} {<Id.Lit_VarLike 'stub='> ($ Id.VSub_DollarName '$dir') <'/bin/osh-byterun'>})
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$stub')}
                )
                (redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.MultiLine
                      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'>
                      ]
                    )
                )
              ]
              do_fork: T
            )
            (C {<chmod>} {<Id.Lit_Other '+'> <x>} {($ Id.VSub_DollarName '$stub')})
          ]
        )
    )
    (command.ShFunction
      name: oil-repo
      body: 
        (BraceGroup
          children: [
            (C {<local>} 
              {<Id.Lit_VarLike 'repo_root='> 
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  child: 
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [(C {<cd>} {($ Id.VSub_DollarName '$THIS_DIR') <'/..'>}) (C {<pwd>})]
                    )
                )
              }
            )
            (C {<local>} 
              {<Id.Lit_VarLike 'files='> 
                (sh_array_literal
                  left: <Id.Op_LParen _>
                  words: [
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<oil-python-sources>} {($ Id.VSub_DollarName '$repo_root')})
                      )
                    }
                  ]
                )
              }
            )
            (C {<_compile-tree>} {($ Id.VSub_DollarName '$repo_root')} {<'_tmp/repo-with-cpython/'>} 
              {<ccompile>} {(DQ (braced_var_sub token:<Id.VSub_Name files> bracket_op:(bracket_op.WholeArray op_id:Id.Lit_At)))}
            )
            (C {<_compile-tree>} {($ Id.VSub_DollarName '$repo_root')} {<'_tmp/repo-with-opy/'>} {<opy>} 
              {
                (DQ 
                  (braced_var_sub
                    token: <Id.VSub_Name files>
                    bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                  )
                )
              }
            )
            (C {<_fill-oil-tree>} {<'_tmp/repo-with-cpython'>})
            (C {<_fill-oil-tree>} {<'_tmp/repo-with-opy'>})
          ]
        )
    )
    (command.ShFunction
      name: _oil-bin-manifest
      body: 
        (BraceGroup
          children: [
            (command.Pipeline
              children: [
                (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.ShFunction
      name: oil-bin
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{<pushd>} {($ Id.VSub_DollarName '$THIS_DIR') <'/..'>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
              do_fork: T
            )
            (command.Pipeline
              children: [(C {<_oil-bin-manifest>}) (C {<compile-manifest>} {<'_tmp/oil-with-opy'>})]
              negated: F
            )
            (command.Simple
              words: [{<popd>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: _opy-bin-manifest
      body: 
        (BraceGroup
          children: [(C {<'build/actions.sh'>} {<py-to-compile>} {(SQ <.>)} {(SQ <bin.opy_>)})]
        )
    )
    (command.ShFunction
      name: opy-bin
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{<pushd>} {<..>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
              do_fork: T
            )
            (command.Pipeline
              children: [(C {<_opy-bin-manifest>}) (C {<compile-manifest>} {<'_tmp/opy-with-opy'>})]
              negated: F
            )
            (command.Simple
              words: [{<popd>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
              do_fork: T
            )
          ]
        )
    )
    (C {(DQ ($ Id.VSub_At '$@'))})
  ]
)