(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 '$('>
          command_list: 
            (command.CommandList
              children: [
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (C {<cd>} 
                      {
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          command_list: 
                            (command.CommandList
                              children: [(C {<dirname>} {($ Id.VSub_Number '$0')})]
                            )
                        )
                      }
                    )
                    (C {<pwd>})
                  ]
                )
              ]
            )
        )
      }
    )
    (C {<source>} {($ Id.VSub_DollarName '$THIS_DIR') </common.sh>})
    (C {<readonly>} 
      {<Id.Lit_VarLike 'REPO_ROOT='> 
        (command_sub
          left_token: <Id.Left_DollarParen '$('>
          command_list: 
            (command.CommandList
              children: [
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [(C {<cd>} {($ Id.VSub_DollarName '$THIS_DIR') </..>}) (C {<pwd>})]
                )
              ]
            )
        )
      }
    )
    (command.ShFunction
      name: _all-py-files
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'fmt='> ($ Id.VSub_Number '$1')})
            (C {<oil-python-sources>} {($ Id.VSub_DollarName '$REPO_ROOT')} 
              {(DQ ($ Id.VSub_DollarName '$fmt'))}
            )
            (C {<cat>} {($ Id.VSub_DollarName '$REPO_ROOT') </_build/py-to-compile.txt>} 
              (word.BracedTree
                parts: [
                  ($ Id.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 ($ Id.VSub_At '$@'))}) (C {<sort>}) (C {<uniq>})]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: _copy
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'dest_dir='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'src_path='> ($ Id.VSub_Number '$2')})
            (C {<local>} {<Id.Lit_VarLike 'dest_rel_path='> ($ Id.VSub_Number '$3')})
            (C {<local>} 
              {<Id.Lit_VarLike 'dest='> ($ Id.VSub_DollarName '$dest_dir') </> 
                ($ Id.VSub_DollarName '$dest_rel_path')
              }
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:dest)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Name dest>
                        suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{<c>})
                      )
                    }
                  spids: [196]
                )
              ]
            )
            (C {<mkdir>} {<-p>} 
              {
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {<dirname>} {($ Id.VSub_DollarName '$dest')})]
                    )
                )
              }
            )
            (C {<cp>} {<-v>} {<--no-target-directory>} {($ Id.VSub_DollarName '$src_path')} 
              {($ Id.VSub_DollarName '$dest')}
            )
          ]
        )
    )
    (command.ShFunction
      name: import
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'dest='> <_regtest/src>})
            (C {<mkdir>} {<-p>} {($ Id.VSub_DollarName '$dest')})
            (command.Pipeline
              children: [
                (C {<all-py-files>} {(SQ <'%p %P\\n'>)})
                (C {<xargs>} {<-n>} {<2>} {<-->} {($ Id.VSub_Number '$0')} {<_copy>} 
                  {($ Id.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>} 
              {<Id.Lit_VarLike 'pat='> 
                (braced_var_sub
                  token: <Id.VSub_Number 1>
                  suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{})
                )
              }
            )
            (C {<local>} {<Id.Lit_VarLike 'dest='> <_tmp/regtest>})
            (C {<mkdir>} {<-p>} {($ Id.VSub_DollarName '$dest')})
            (command.TimeBlock
              pipeline: 
                (command.Pipeline
                  children: [
                    (C {<manifest>})
                    (C {<egrep>} {(DQ ($ Id.VSub_DollarName '$pat'))})
                    (C {<./build.sh>} {<compile-manifest>} {($ Id.VSub_DollarName '$dest')})
                  ]
                  negated: F
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: checksum
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<find>} {<_tmp/regtest>} {<-type>} {<f>})
                (C {<xargs>} {($ Id.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: <Id.Op_Semi _>
                    )
                  ]
                  action: [(C {<echo>} {<OK>})]
                  spids: [421 436]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.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>} {<Id.Lit_VarLike 'rel_path='> (SQ <opy/compiler2/transformer.pyc>)})
            (C {<ls>} {<-l>} {<_tmp/regtest/> ($ Id.VSub_DollarName '$rel_path')})
            (command.Pipeline
              children: [
                (C {<unzip>} {<-p>} {($ Id.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 {($ Id.VSub_DollarName '$THIS_DIR') </../bin/opyc>} {<eval>} {(SQ <'1+2*3'>)})
            (command.Pipeline
              children: [
                (C {<echo>} {(SQ <'4+5*6'>)})
                (C {($ Id.VSub_DollarName '$THIS_DIR') </../bin/opyc>} {<repl>})
              ]
              negated: F
            )
          ]
        )
    )
    (C {(DQ ($ Id.VSub_At '$@'))})
  ]
)