(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:maxarchivedir) op:Equal rhs:{(10)} spids:[7])]
      spids: [7]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:compress) op:Equal rhs:{(gzip)} spids:[13])]
      spids: [13]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:progname)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})])
                left_token: <Left_CommandSub '$('>
                spids: [20 24]
              )
            }
          spids: [19]
        )
      ]
      spids: [19]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-eq)} {(0)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Sentence
              child: 
                (SimpleCommand
                  words: [{(echo)} {(DQ ('Usage: ') ($ VSub_Name '$progname') (' directory'))}]
                  redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                )
              terminator: <Op_Semi ';'>
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 44]
        )
      ]
      spids: [16777215 66]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(-d)} {($ VSub_Number '$1')} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Sentence
              child: 
                (SimpleCommand
                  words: [
                    {(echo)}
                    {
                      (DQ (${ VSub_Name progname) (": can't find directory ") ($ VSub_Number '$1') 
                        (' to archive.')
                      )
                    }
                  ]
                  redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                )
              terminator: <Op_Semi ';'>
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 83]
        )
      ]
      spids: [16777215 105]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {($ VSub_Number '$1')})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [113 117]
                      )
                    )
                  } {(KW_Bang '!') (Lit_Other '=')} {(DQ ($ VSub_Number '$1'))} {(-o)} {(DQ ($ VSub_Number '$1'))} 
                  {(Lit_Other '=')} {(DQ (.))} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ (${ VSub_Name progname) (': you must specify a subdirectory'))}]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 143]
        )
      ]
      spids: [16777215 163]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-w)} {(.)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [
                {(echo)}
                {(DQ (${ VSub_Name progname) (': cannot write archive file to current directory.'))}
              ]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 180]
        )
      ]
      spids: [16777215 200]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:dirsize)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(du)} {(-s)} {($ VSub_Number '$1')})
                            (C {(awk)} {(SQ <'{print $1}'>)})
                          ]
                          negated: F
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [209 223]
                )
              )
            }
          spids: [207]
        )
      ]
      spids: [207]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {($ VSub_Name '$dirsize')} {(-gt)} {($ VSub_Name '$maxarchivedir')} 
                  {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(-n)} 
              {
                (DQ ('Warning: directory ') ($ VSub_Number '$1') (' is ') ($ VSub_Name '$dirsize') 
                  (' blocks. Proceed? [n] ')
                )
              }
            )
            (C {(read)} {(answer)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:answer)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (Pipeline
                                  children: [
                                    (C {(echo)} {($ VSub_Name '$answer')})
                                    (C {(tr)} {(SQ <'[:upper:]'>)} {(SQ <'[:lower:]'>)})
                                    (C {(cut)} {(-c1)})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [265 287]
                        )
                      )
                    }
                  spids: [263]
                )
              ]
              spids: [263]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$answer'))} 
                          {(KW_Bang '!') (Lit_Other '=')} {(DQ (y))} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ (${ VSub_Name progname) (': archive of directory ') ($ VSub_Number '$1') 
                            (' canceled.')
                          )
                        }
                      ]
                      redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                    )
                    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
                  ]
                  spids: [16777215 310]
                )
              ]
              spids: [16777215 333]
            )
          ]
          spids: [16777215 241]
        )
      ]
      spids: [16777215 335]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:archivename)
          op: Equal
          rhs: {(DQ ($ VSub_Number '$1') (.tgz))}
          spids: [338]
        )
      ]
      spids: [338]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (Pipeline
                  children: [
                    (C {(tar)} {(cf)} {(-)} {($ VSub_Number '$1')})
                    (SimpleCommand
                      words: [{($ VSub_Name '$compress')}]
                      redirects: [
                        (Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {($ VSub_Name '$archivename')}
                        )
                      ]
                    )
                  ]
                  negated: F
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} 
              {
                (DQ ('Directory ') ($ VSub_Number '$1') (' archived as ') ($ VSub_Name '$archivename'))
              }
            )
          ]
          spids: [16777215 365]
        )
      ]
      else_action: [
        (C {(echo)} {(DQ ('Warning: tar encountered errors archiving ') ($ VSub_Number '$1'))})
      ]
      spids: [377 387]
    )
    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
  ]
)