(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ONBLDDIR='> name:ONBLDDIR)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (C {<dirname>} 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<whence>} {($ Id.VSub_Number 0)})
                        right: <Id.Eof_RParen _>
                      )
                    }
                  )
                right: <Id.Eof_RParen _>
              )
            }
          spids: [97]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PATH='> name:PATH)
          op: assign_op.Equal
          rhs: 
            {<'/usr/bin'> <Id.Lit_Colon ':'> 
              (braced_var_sub
                left: <Id.Left_DollarBrace '${'>
                token: <Id.VSub_Name BUILD_TOOLS>
                var_name: BUILD_TOOLS
                suffix_op: 
                  (suffix_op.Unary
                    op: <Id.VTest_ColonHyphen _>
                    arg_word: {<Id.Lit_Slash '/'> <opt>}
                  )
                right: <Id.Right_DollarBrace '}'>
              ) <'/teamware/bin'> <Id.Lit_Colon ':'> ($ Id.VSub_DollarName ONBLDDIR)
            }
          spids: [109]
        )
      ]
      redirects: []
    )
    (C {<export>} {<PATH>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PROG='> name:PROG)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<basename>} {($ Id.VSub_Number 0)})
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [126]
        )
      ]
      redirects: []
    )
    (C {<unset>} {<CDPATH>})
    (command.ShFunction
      name: usage
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              words: [{<echo>} {(DQ <'usage: '> ($ Id.VSub_DollarName PROG) <' [-r] [<dir>]'>)}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/stderr'>})]
              more_env: []
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: fail
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              words: [{<echo>} {($ Id.VSub_DollarName PROG) <Id.Lit_Colon ':'>} {($ Id.VSub_At '@')}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/stderr'>})]
              more_env: []
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: find_files
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'pat='> name:pat)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 1)}
                  spids: [249]
                )
              ]
              redirects: []
            )
            (C {<shift>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobEqual
                                  left: {(DQ ($ Id.VSub_DollarName SCM_MODE))}
                                  right: {(DQ <teamware>)}
                                )
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ForEach
                      iter_names: [dir]
                      iterable: (for_iter.Args)
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (command.DBracket
                                              expr: 
                                                (bool_expr.Unary
                                                  op_id: Id.BoolUnary_d
                                                  child: 
                                                    {($ Id.VSub_DollarName CODEMGR_WS) <'/'> 
                                                      ($ Id.VSub_DollarName dir)
                                                    }
                                                )
                                              redirects: []
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<cd>} {($ Id.VSub_DollarName CODEMGR_WS)})
                                    (command.Pipeline
                                      children: [
                                        (C {<find>} {($ Id.VSub_DollarName dir)} {<-name>} 
                                          {(DQ ($ Id.VSub_DollarName pat))}
                                        )
                                        (C {<sed>} {<-n>} 
                                          {<s> <Id.Lit_Colon ':'> <'/SCCS/s.'> <Id.Lit_Colon ':'> <'/'> 
                                            <Id.Lit_Colon ':'> <p>
                                          }
                                        )
                                        (C {<prpath>})
                                      ]
                                      negated: F
                                      stderr_indices: []
                                    )
                                    (command.Simple
                                      words: [{<cd>} {<->}]
                                      redirects: [
                                        (redir
                                          op: <Id.Redir_Great '>'>
                                          loc: (redir_loc.Fd fd:1)
                                          arg: {<'/dev/null'>}
                                        )
                                      ]
                                      more_env: []
                                      do_fork: T
                                    )
                                  ]
                                  spids: [285 298]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                          ]
                        )
                      redirects: []
                    )
                  ]
                  spids: [257 274]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.LogicalOr
                                  left: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobEqual
                                      left: {(DQ ($ Id.VSub_DollarName SCM_MODE))}
                                      right: {(DQ <mercurial>)}
                                    )
                                  right: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobDEqual
                                      left: {(DQ ($ Id.VSub_DollarName SCM_MODE))}
                                      right: {(DQ <git>)}
                                    )
                                )
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dirs='> name:dirs)
                          op: assign_op.Equal
                          rhs: {(DQ )}
                          spids: [384]
                        )
                      ]
                      redirects: []
                    )
                    (command.ForEach
                      iter_names: [dir]
                      iterable: (for_iter.Args)
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (command.DBracket
                                              expr: 
                                                (bool_expr.Unary
                                                  op_id: Id.BoolUnary_d
                                                  child: 
                                                    {($ Id.VSub_DollarName CODEMGR_WS) <'/'> 
                                                      ($ Id.VSub_DollarName dir)
                                                    }
                                                )
                                              redirects: []
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'dirs='>
                                              name: dirs
                                            )
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ ($ Id.VSub_DollarName dirs) <'|'> 
                                                (braced_var_sub
                                                  left: <Id.Left_DollarBrace '${'>
                                                  token: <Id.VSub_Name dir>
                                                  var_name: dir
                                                  suffix_op: 
                                                    (suffix_op.Unary
                                                      op: <Id.VOp1_Percent '%'>
                                                      arg_word: {<Id.Lit_Slash '/'>}
                                                    )
                                                  right: <Id.Right_DollarBrace '}'>
                                                )
                                              )
                                            }
                                          spids: [413]
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                  spids: [397 410]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                          ]
                        )
                      redirects: []
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dirs='> name:dirs)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (braced_var_sub
                                left: <Id.Left_DollarBrace '${'>
                                token: <Id.VSub_Name dirs>
                                var_name: dirs
                                suffix_op: 
                                  (suffix_op.Unary
                                    op: <Id.VOp1_Pound '#'>
                                    arg_word: 
                                      {
                                        (word_part.EscapedLiteral
                                          token: <Id.Lit_EscapedChar '\\|'>
                                          ch: '|'
                                        )
                                      }
                                  )
                                right: <Id.Right_DollarBrace '}'>
                              )
                            }
                          spids: [436]
                        )
                      ]
                      redirects: []
                    )
                    (command.Pipeline
                      children: [
                        (C {<echo>} {(DQ ($ Id.VSub_DollarName FILELIST))})
                        (C {<egrep>} 
                          {
                            (DQ <'^('> ($ Id.VSub_DollarName dirs) <')/.*/'> 
                              (braced_var_sub
                                left: <Id.Left_DollarBrace '${'>
                                token: <Id.VSub_Name pat>
                                var_name: pat
                                suffix_op: (suffix_op.Unary op:<Id.VOp1_Pound '#'> arg_word:{<s.>})
                                right: <Id.Right_DollarBrace '}'>
                              ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$')
                            )
                          }
                        )
                        (C {<prpath>})
                      ]
                      negated: F
                      stderr_indices: []
                    )
                  ]
                  spids: [352 381]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: echo_file
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {<-f>} 
                  {($ Id.VSub_DollarName CODEMGR_WS) <'/'> ($ Id.VSub_Number 1)} {<Id.Lit_RBracket ']'>}
                )
                (command.Pipeline
                  children: [(C {<echo>} {($ Id.VSub_Number 1)}) (C {<prpath>})]
                  negated: F
                  stderr_indices: []
                )
              ]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: exec_file
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobEqual
                                  left: 
                                    {
                                      (DQ 
                                        (braced_var_sub
                                          left: <Id.Left_DollarBrace '${'>
                                          token: <Id.VSub_Number 1>
                                          var_name: 1
                                          suffix_op: 
                                            (suffix_op.Unary
                                              op: <Id.VOp1_DPound '##'>
                                              arg_word: {<Id.Lit_Slash '/'>}
                                            )
                                          right: <Id.Right_DollarBrace '}'>
                                        )
                                      )
                                    }
                                  right: {(DQ ($ Id.VSub_Number 1))}
                                )
                              redirects: []
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<.>} {($ Id.VSub_DollarName CODEMGR_WS) <'/'> ($ Id.VSub_Number 1)})]
                  spids: [540 561]
                )
              ]
              else_action: [(C {<.>} {($ Id.VSub_Number 1)})]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: incflg
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {<cd>} {($ Id.VSub_Number 1)})
            (command.ForEach
              iter_names: [i]
              iterable: (for_iter.Words words:[{<Id.Lit_Star '*'>} {<.> <Id.Lit_Star '*'>}])
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {($ Id.VSub_DollarName i)}
                      arms: [
                        (case_arm
                          pat_list: [{(SQ <'*'>)} {<.>} {<..>}]
                          action: []
                          spids: [630 637 640 -1]
                        )
                        (case_arm
                          pat_list: [{<inc.flg>}]
                          action: [
                            (C {<exec_file>} {($ Id.VSub_Number 1) <'/'> ($ Id.VSub_DollarName i)})
                          ]
                          spids: [643 644 654 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (command.DBracket
                                              expr: 
                                                (bool_expr.LogicalAnd
                                                  left: 
                                                    (bool_expr.Unary
                                                      op_id: Id.BoolUnary_d
                                                      child: {($ Id.VSub_DollarName i)}
                                                    )
                                                  right: 
                                                    (bool_expr.LogicalNot
                                                      child: 
                                                        (bool_expr.Unary
                                                          op_id: Id.BoolUnary_h
                                                          child: {($ Id.VSub_DollarName i)}
                                                        )
                                                    )
                                                )
                                              redirects: []
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<incflg>} {($ Id.VSub_Number 1) <'/'> ($ Id.VSub_DollarName i)})
                                    (C {<cd>} {($ Id.VSub_Number 1)})
                                  ]
                                  spids: [661 680]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                          ]
                          spids: [657 658 698 -1]
                        )
                      ]
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: prpath
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'reltree='> name:reltree)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        left: <Id.Left_DollarBrace '${'>
                        token: <Id.VSub_Name CURTREE>
                        var_name: CURTREE
                        suffix_op: 
                          (suffix_op.Unary
                            op: <Id.VOp1_DPound '##'>
                            arg_word: 
                              {($ Id.VSub_DollarName CODEMGR_WS) 
                                (word_part.ExtGlob
                                  op: <Id.ExtGlob_QMark '?('>
                                  arms: [{<'/'>}]
                                )
                              }
                          )
                        right: <Id.Right_DollarBrace '}'>
                      )
                    }
                  spids: [756]
                )
              ]
              redirects: []
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: (C {<read>} {<srcfile>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_GlobNEqual
                                          left: {(DQ ($ Id.VSub_DollarName RELPATHS))}
                                          right: {<y>}
                                        )
                                      redirects: []
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<echo>} {($ Id.VSub_DollarName srcfile)})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Continue continue>
                            )
                          ]
                          spids: [778 793]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dots='> name:dots)
                          op: assign_op.Equal
                          rhs: (rhs_word.Empty)
                          spids: [808]
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tree='> name:tree)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName reltree)}
                          spids: [811]
                        )
                      ]
                      redirects: []
                    )
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobEqual
                                      left: 
                                        {
                                          (DQ 
                                            (braced_var_sub
                                              left: <Id.Left_DollarBrace '${'>
                                              token: <Id.VSub_Name srcfile>
                                              var_name: srcfile
                                              suffix_op: 
                                                (suffix_op.Unary
                                                  op: <Id.VOp1_DPound '##'>
                                                  arg_word: {($ Id.VSub_DollarName tree)}
                                                )
                                              right: <Id.Right_DollarBrace '}'>
                                            )
                                          )
                                        }
                                      right: {(DQ ($ Id.VSub_DollarName srcfile))}
                                    )
                                  redirects: []
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      body: 
                        (command.DoGroup
                          children: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dots='> name:dots)
                                  op: assign_op.Equal
                                  rhs: {<'../'> ($ Id.VSub_DollarName dots)}
                                  spids: [839]
                                )
                              ]
                              redirects: []
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tree='> name:tree)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: <Id.Left_Backtick '`'>
                                        child: (C {<dirname>} {($ Id.VSub_DollarName tree)})
                                        right: <Id.Backtick_Right '`'>
                                      )
                                    }
                                  spids: [844]
                                )
                              ]
                              redirects: []
                            )
                            (command.AndOr
                              ops: [Id.Op_DAmp]
                              children: [
                                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName tree))} 
                                  {<Id.Lit_Equals '='>} {(DQ <.>)} {<Id.Lit_RBracket ']'>}
                                )
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Break break>
                                )
                              ]
                            )
                          ]
                        )
                      redirects: []
                    )
                    (C {<echo>} 
                      {(${ Id.VSub_Name dots) 
                        (braced_var_sub
                          left: <Id.Left_DollarBrace '${'>
                          token: <Id.VSub_Name srcfile>
                          var_name: srcfile
                          suffix_op: 
                            (suffix_op.Unary
                              op: <Id.VOp1_DPound '##'>
                              arg_word: {($ Id.VSub_DollarName tree) <Id.Lit_Slash '/'>}
                            )
                          right: <Id.Right_DollarBrace '}'>
                        )
                      }
                    )
                  ]
                )
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (command.Pipeline
          children: [(C {<which_scm>}) (C {<read>} {<SCM_MODE>} {<CODEMGR_WS>})]
          negated: F
          stderr_indices: []
        )
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {($ Id.VSub_DollarName SCM_MODE)}
                          right: {(DQ <unknown>)}
                        )
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<fail>} {(DQ <'Unable to determine SCM type currently in use.'>)})]
          spids: [911 926]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {($ Id.VSub_DollarName SCM_MODE)}
                          right: {(DQ <mercurial>)}
                        )
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FILELIST='> name:FILELIST)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<hg>} {<manifest>})
                        right: <Id.Eof_RParen _>
                      )
                    }
                  spids: [953]
                )
              ]
              redirects: []
            )
          ]
          spids: [935 950]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {($ Id.VSub_DollarName SCM_MODE)}
                          right: {(DQ <git>)}
                        )
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FILELIST='> name:FILELIST)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (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>} 
                                        {
                                          (command_sub
                                            left_token: <Id.Left_DollarParen '$('>
                                            child: (C {<git>} {<rev-parse>} {<--git-dir>})
                                            right: <Id.Eof_RParen _>
                                          )
                                        }
                                      )
                                    right: <Id.Eof_RParen _>
                                  )
                                }
                              )
                              (C {<git>} {<ls-files>})
                            ]
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                  spids: [978]
                )
              ]
              redirects: []
            )
          ]
          spids: [960 975]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobNEqual
                          left: {($ Id.VSub_DollarName SCM_MODE)}
                          right: {(DQ <teamware>)}
                        )
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [(C {<fail>} {(DQ <'Unsupported SCM in use: '> ($ Id.VSub_DollarName SCM_MODE))})]
          spids: [1001 1016]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [(command.Sentence child:(C {<getopts>} {<r>} {<flag>}) terminator:<Id.Op_Semi _>)]
        )
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_DollarName flag)}
              arms: [
                (case_arm
                  pat_list: [{<r>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'RELPATHS='> name:RELPATHS)
                          op: assign_op.Equal
                          rhs: {<y>}
                          spids: [1052]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [1048 1049 1056 -1]
                )
                (case_arm
                  pat_list: [{(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\?'> ch:'?')}]
                  action: [(C {<usage>})]
                  spids: [1059 1060 1066 -1]
                )
              ]
              redirects: []
            )
          ]
        )
      redirects: []
    )
    (C {<shift>} 
      {
        (word_part.ArithSub
          anode: 
            (arith_expr.Binary
              op_id: Id.Arith_Minus
              left: ($ Id.Lit_ArithVarLike OPTIND)
              right: {<Id.Lit_Digits 1>}
            )
        )
      }
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-gt>} {<1>} {<Id.Lit_RBracket ']'>})
        (C {<usage>})
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CURTREE='> name:CURTREE)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<'/bin/pwd'>})
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [1101]
        )
      ]
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_eq
                          left: {($ Id.VSub_Pound '#')}
                          right: {<0>}
                        )
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SUBTREE='> name:SUBTREE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName CURTREE)}
                  spids: [1134]
                )
              ]
              redirects: []
            )
          ]
          spids: [1118 1131]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: (bool_expr.Unary op_id:Id.BoolUnary_d child:{($ Id.VSub_Number 1)})
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SUBTREE='> name:SUBTREE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 1)}
                  spids: [1151]
                )
              ]
              redirects: []
            )
          ]
          spids: [1137 1148]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Unary
                          op_id: Id.BoolUnary_d
                          child: {($ Id.VSub_DollarName CODEMGR_WS) <'/'> ($ Id.VSub_Number 1)}
                        )
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SUBTREE='> name:SUBTREE)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName CODEMGR_WS) <'/'> ($ Id.VSub_Number 1)}
                  spids: [1170]
                )
              ]
              redirects: []
            )
          ]
          spids: [1154 1167]
        )
      ]
      else_action: [
        (C {<fail>} 
          {
            (DQ <'neither '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'> ch:'$') 
              <'CODEMGR_WS/'> ($ Id.VSub_Number 1) <' nor '> ($ Id.VSub_Number 1) <' exists as a directory'>
            )
          }
        )
      ]
      redirects: []
    )
    (C {<cd>} {($ Id.VSub_DollarName SUBTREE)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SUBTREE='> name:SUBTREE)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<'/bin/pwd'>})
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [1206]
        )
      ]
      redirects: []
    )
    (C {<cd>} {($ Id.VSub_DollarName CURTREE)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CURTREE='> name:CURTREE)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<'/bin/pwd'>})
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [1227]
        )
      ]
      redirects: []
    )
    (C {<cd>} {($ Id.VSub_DollarName CODEMGR_WS)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CODEMGR_WS='> name:CODEMGR_WS)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<'/bin/pwd'>})
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [1248]
        )
      ]
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobEqual
                          left: 
                            {
                              (DQ 
                                (braced_var_sub
                                  left: <Id.Left_DollarBrace '${'>
                                  token: <Id.VSub_Name SUBTREE>
                                  var_name: SUBTREE
                                  suffix_op: 
                                    (suffix_op.Unary
                                      op: <Id.VOp1_DPound '##'>
                                      arg_word: {($ Id.VSub_DollarName CODEMGR_WS)}
                                    )
                                  right: <Id.Right_DollarBrace '}'>
                                )
                              )
                            }
                          right: {(DQ ($ Id.VSub_DollarName SUBTREE))}
                        )
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<fail>} 
              {
                (DQ ($ Id.VSub_DollarName SUBTREE) <' is not a subtree of '> 
                  (word_part.EscapedLiteral
                    token: <Id.Lit_EscapedChar '\\$'>
                    ch: '$'
                  ) <CODEMGR_WS>
                )
              }
            )
          ]
          spids: [1256 1277]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobEqual
                          left: 
                            {
                              (DQ 
                                (braced_var_sub
                                  left: <Id.Left_DollarBrace '${'>
                                  token: <Id.VSub_Name CURTREE>
                                  var_name: CURTREE
                                  suffix_op: 
                                    (suffix_op.Unary
                                      op: <Id.VOp1_DPound '##'>
                                      arg_word: {($ Id.VSub_DollarName CODEMGR_WS)}
                                    )
                                  right: <Id.Right_DollarBrace '}'>
                                )
                              )
                            }
                          right: {(DQ ($ Id.VSub_DollarName CURTREE))}
                        )
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<fail>} 
              {
                (DQ ($ Id.VSub_DollarName CURTREE) <' is not a subtree of '> 
                  (word_part.EscapedLiteral
                    token: <Id.Lit_EscapedChar '\\$'>
                    ch: '$'
                  ) <CODEMGR_WS>
                )
              }
            )
          ]
          spids: [1292 1313]
        )
      ]
      else_action: []
      redirects: []
    )
    (C {<incflg>} {($ Id.VSub_DollarName SUBTREE)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'TREE='> name:TREE)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName SUBTREE)}
          spids: [1351]
        )
      ]
      redirects: []
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobNEqual
                      left: {($ Id.VSub_DollarName TREE)}
                      right: {($ Id.VSub_DollarName CODEMGR_WS)}
                    )
                  redirects: []
                )
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      body: 
        (command.DoGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.Unary
                      op_id: Id.BoolUnary_f
                      child: {($ Id.VSub_DollarName TREE) <'/req.flg'>}
                    )
                  redirects: []
                )
                (C {<exec_file>} {($ Id.VSub_DollarName TREE) <'/req.flg'>})
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'TREE='> name:TREE)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<dirname>} {($ Id.VSub_DollarName TREE)})
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [1387]
                )
              ]
              redirects: []
            )
          ]
        )
      redirects: []
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)