(CommandList
  children: [
    (FuncDef
      name: noversion
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:LOGRUS)
                  op: Equal
                  rhs: 
                    {
                      (SQ 
                        <
's/-*\\(\\([0-9\\.]\\)*\\([_-]rc\\)*\\(-pre\\)*\\([0-9][a-zA-Z]\\)*\\)*\\(\\.tar\\(\\..z2*\\)*\\)$'
                        >
                      )
                    }
                  spids: [131]
                )
              ]
              spids: [131]
            )
            (AndOr
              ops: [Op_DAmp Op_DPipe]
              children: [
                (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Number '$2'))} {(Lit_Other ']')})
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:LOGRUS)
                      op: Equal
                      rhs: {(DQ ($ VSub_Name '$LOGRUS') (//))}
                      spids: [149]
                    )
                  ]
                  spids: [149]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:LOGRUS)
                      op: Equal
                      rhs: 
                        {
                          (DQ ($ VSub_Name '$LOGRUS') (/) ($ VSub_Number '$2') 
                            (EscapedLiteralPart
                              token: <Lit_EscapedChar '\\\\'>
                            ) (6/)
                          )
                        }
                      spids: [157]
                    )
                  ]
                  spids: [157]
                )
              ]
            )
            (Pipeline
              children: [
                (C {(echo)} {(DQ ($ VSub_Number '$1'))})
                (C {(sed)} {(-e)} {(DQ ($ VSub_Name '$LOGRUS'))})
              ]
              negated: F
            )
          ]
          spids: [128]
        )
      spids: [124 127]
    )
    (FuncDef
      name: gather_patches
      body: 
        (BraceGroup
          children: [
            (Pipeline
              children: [
                (SimpleCommand
                  words: [
                    {(ls)}
                    {(DQ ($ VSub_Name '$PATCHDIR') (/) (${ VSub_Name PACKAGE)) (-) (Lit_Other '*') 
                      (.patch)
                    }
                  ]
                  redirects: [(Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
                )
                (C {(sort)})
                (WhileUntil
                  keyword: <KW_While while>
                  cond: [(C {(read)} {(i)})]
                  body: 
                    (DoGroup
                      children: [
                        (If
                          arms: [
                            (if_arm
                              cond: [
                                (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$i'))} {(Lit_Other ']')})
                              ]
                              action: [(C {(echo)} {(DQ ($ VSub_Name '$i'))})]
                              spids: [16777215 240]
                            )
                          ]
                          spids: [16777215 250]
                        )
                      ]
                      spids: [224 253]
                    )
                )
              ]
              negated: F
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$MY_PATCH_DIR'))} 
                          {(Lit_Other ']')}
                        )
                        (C {(Lit_Other '[')} {(-d)} 
                          {(DQ (${ VSub_Name MY_PATCH_DIR) (/) (${ VSub_Name PACKAGE))} {(Lit_Other ']')}
                        )
                      ]
                    )
                  ]
                  action: [
                    (ForEach
                      iter_name: i
                      iter_words: [
                        {(DQ (${ VSub_Name MY_PATCH_DIR) (/) (${ VSub_Name PACKAGE) (/)) 
                          (Lit_Other '*') (.patch)
                        }
                      ]
                      do_arg_iter: F
                      body: 
                        (DoGroup
                          children: [
                            (If
                              arms: [
                                (if_arm
                                  cond: [
                                    (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$i'))} 
                                      {(Lit_Other ']')}
                                    )
                                  ]
                                  action: [(C {(echo)} {(DQ ($ VSub_Name '$i'))})]
                                  spids: [16777215 333]
                                )
                              ]
                              spids: [16777215 343]
                            )
                          ]
                          spids: [317 346]
                        )
                      spids: [302 16777215]
                    )
                  ]
                  spids: [16777215 294]
                )
              ]
              spids: [16777215 349]
            )
          ]
          spids: [191]
        )
      spids: [187 190]
    )
    (FuncDef
      name: patch_package
      body: 
        (BraceGroup
          children: [
            (Pipeline
              children: [
                (C {(gather_patches)})
                (WhileUntil
                  keyword: <KW_While while>
                  cond: [(C {(read)} {(i)})]
                  body: 
                    (DoGroup
                      children: [
                        (If
                          arms: [
                            (if_arm
                              cond: [
                                (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$i'))} {(Lit_Other ']')})
                              ]
                              action: [
                                (C {(echo)} {(DQ ('Applying ') ($ VSub_Name '$i'))})
                                (AndOr
                                  ops: [Op_DPipe]
                                  children: [
                                    (Subshell
                                      child: 
                                        (AndOr
                                          ops: [Op_DAmp Op_DAmp]
                                          children: [
                                            (C {(cd)} 
                                              {
                                                (DQ (${ VSub_Name SRCTREE) (/) (${ VSub_Name PACKAGE))
                                              }
                                            )
                                            (C {(patch)} {(-p1)} {(-i)} {(DQ ($ VSub_Name '$i'))})
                                            (SimpleCommand
                                              words: [{(sha1file)} {(DQ ($ VSub_Name '$i'))}]
                                              redirects: [
                                                (Redir
                                                  op: <Redir_DGreat '>>'>
                                                  fd: 16777215
                                                  arg_word: {(DQ ($ VSub_Name '$SHA1FILE'))}
                                                )
                                              ]
                                            )
                                          ]
                                        )
                                      spids: [402 442]
                                    )
                                    (If
                                      arms: [
                                        (if_arm
                                          cond: [
                                            (C {(Lit_Other '[')} {(-z)} 
                                              {(DQ ($ VSub_Name '$ALLOW_PATCH_FAILURE'))} {(Lit_Other ']')}
                                            )
                                          ]
                                          action: [(C {(dienow)})]
                                          spids: [16777215 460]
                                        )
                                      ]
                                      spids: [16777215 466]
                                    )
                                  ]
                                )
                              ]
                              spids: [16777215 391]
                            )
                          ]
                          spids: [16777215 469]
                        )
                      ]
                      spids: [375 472]
                    )
                )
              ]
              negated: F
            )
          ]
          spids: [361]
        )
      spids: [357 360]
    )
    (FuncDef
      name: find_package_tarball
      body: 
        (BraceGroup
          children: [
            (Pipeline
              children: [
                (SimpleCommand
                  words: [
                    {(ls)}
                    {(-tc)}
                    {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Number '$1') (-)) (Lit_Other '*') (.tar) 
                      (Lit_Other '*')
                    }
                  ]
                  redirects: [(Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
                )
                (WhileUntil
                  keyword: <KW_While while>
                  cond: [(C {(read)} {(i)})]
                  body: 
                    (DoGroup
                      children: [
                        (If
                          arms: [
                            (if_arm
                              cond: [
                                (C {(Lit_Other '[')} 
                                  {
                                    (DQ 
                                      (CommandSubPart
                                        command_list: 
                                          (CommandList
                                            children: [
                                              (C {(noversion)} 
                                                {
                                                  (DQ 
                                                    (BracedVarSub
                                                      token: <VSub_Name i>
                                                      suffix_op: 
                                                        (PatSub
                                                          pat: 
                                                            {('*') 
                                                              (EscapedLiteralPart
                                                                token: <Lit_EscapedChar '\\/'>
                                                              )
                                                            }
                                                          replace: {(EmptyPart)}
                                                          do_all: F
                                                          do_prefix: F
                                                          do_suffix: F
                                                        )
                                                      spids: [543 549]
                                                    )
                                                  )
                                                }
                                              )
                                            ]
                                          )
                                        left_token: <Left_CommandSub '$('>
                                        spids: [539 551]
                                      )
                                    )
                                  } {(Lit_Other '=') (Lit_Other '=')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ']')}
                                )
                              ]
                              action: [
                                (C {(echo)} {(DQ ($ VSub_Name '$i'))})
                                (ControlFlow
                                  token: <ControlFlow_Break break>
                                )
                              ]
                              spids: [16777215 564]
                            )
                          ]
                          spids: [16777215 577]
                        )
                      ]
                      spids: [531 580]
                    )
                )
              ]
              negated: F
            )
          ]
          spids: [485]
        )
      spids: [481 484]
    )
    (FuncDef
      name: package_cache
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:SNAPFROM)
                  op: Equal
                  rhs: {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Number '$1'))}
                  spids: [592]
                )
              ]
              spids: [592]
            )
            (AndOr
              ops: [Op_DAmp]
              children: [
                (Subshell
                  child: 
                    (AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(is_in_list)} {(DQ ($ VSub_Number '$1'))} 
                          {(DQ ($ VSub_Name '$IGNORE_REPOS'))}
                        )
                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-d)} {(DQ ($ VSub_Name '$SNAPFROM'))} 
                          {(Lit_Other ']')}
                        )
                      ]
                    )
                  spids: [600 624]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:SNAPFROM)
                      op: Equal
                      rhs: {(DQ ($ VSub_Name '$SRCTREE') (/) ($ VSub_Number '$1'))}
                      spids: [629]
                    )
                  ]
                  spids: [629]
                )
              ]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (C {(Lit_Other '[')} {(KW_Bang '!')} {(-d)} {(DQ ($ VSub_Name '$SNAPFROM'))} 
                      {(Lit_Other ']')}
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {(DQ ($ VSub_Number '$1') (' not found.  Did you run download.sh?'))}
                      ]
                      redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                    )
                    (C {(dienow)})
                  ]
                  spids: [16777215 653]
                )
              ]
              spids: [16777215 670]
            )
            (C {(echo)} {(DQ ($ VSub_Name '$SNAPFROM'))})
          ]
          spids: [589]
        )
      spids: [585 588]
    )
    (FuncDef
      name: extract_package
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DPipe]
              children: [(C {(mkdir)} {(-p)} {(DQ ($ VSub_Name '$SRCTREE'))}) (C {(dienow)})]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:PACKAGE)
                  op: Equal
                  rhs: {(DQ ($ VSub_Number '$1'))}
                  spids: [719]
                )
              ]
              spids: [719]
            )
            (C {(announce)} {(DQ ($ VSub_Name '$PACKAGE'))})
            (AndOr
              ops: [Op_DAmp Op_DAmp]
              children: [
                (Pipeline
                  children: [(C {(is_in_list)} {(DQ (PACKAGE))} {(DQ ($ VSub_Name '$IGNORE_REPOS'))})]
                  negated: T
                )
                (C {(Lit_Other '[')} {(-d)} {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$PACKAGE'))} 
                  {(Lit_Other ']')}
                )
                (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
              ]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:FILENAME)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [(C {(find_package_tarball)} {(DQ ($ VSub_Name '$PACKAGE'))})]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [775 781]
                        )
                      )
                    }
                  spids: [773]
                )
              ]
              spids: [773]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:DECOMPRESS) op:Equal rhs:{(DQ )} spids:[785])]
              spids: [785]
            )
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$FILENAME'))} {(KW_Bang '!') (Lit_Other '=')} 
                  {
                    (DQ 
                      (BracedVarSub
                        token: <VSub_Name FILENAME>
                        suffix_op: 
                          (PatSub
                            pat: 
                              {(EscapedLiteralPart token:<Lit_EscapedChar '\\.'>) (tar) 
                                (EscapedLiteralPart
                                  token: <Lit_EscapedChar '\\.'>
                                ) (bz2)
                              }
                            replace: {(EmptyPart)}
                            do_all: F
                            do_prefix: F
                            do_suffix: T
                          )
                        spids: [800 809]
                      )
                    )
                  } {(Lit_Other ']')}
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:DECOMPRESS)
                      op: Equal
                      rhs: {(DQ (j))}
                      spids: [816]
                    )
                  ]
                  spids: [816]
                )
              ]
            )
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$FILENAME'))} {(KW_Bang '!') (Lit_Other '=')} 
                  {
                    (DQ 
                      (BracedVarSub
                        token: <VSub_Name FILENAME>
                        suffix_op: 
                          (PatSub
                            pat: 
                              {(EscapedLiteralPart token:<Lit_EscapedChar '\\.'>) (tar) 
                                (EscapedLiteralPart
                                  token: <Lit_EscapedChar '\\.'>
                                ) (gz)
                              }
                            replace: {(EmptyPart)}
                            do_all: F
                            do_prefix: F
                            do_suffix: T
                          )
                        spids: [832 841]
                      )
                    )
                  } {(Lit_Other ']')}
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:DECOMPRESS)
                      op: Equal
                      rhs: {(DQ (z))}
                      spids: [848]
                    )
                  ]
                  spids: [848]
                )
              ]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:SHA1NAME)
                  op: Equal
                  rhs: {(DQ (sha1-for-source.txt))}
                  spids: [864]
                )
              ]
              spids: [864]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:SHA1FILE)
                  op: Equal
                  rhs: 
                    {
                      (DQ ($ VSub_Name '$SRCTREE') (/) ($ VSub_Name '$PACKAGE') (/) 
                        ($ VSub_Name '$SHA1NAME')
                      )
                    }
                  spids: [870]
                )
              ]
              spids: [870]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$FILENAME'))} {(Lit_Other ']')})
                  ]
                  action: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(Lit_Other '[')} {(KW_Bang '!')} {(-e)} 
                              {(DQ ($ VSub_Name '$SRCTREE') (/) ($ VSub_Name '$PACKAGE'))} {(Lit_Other ']')}
                            )
                          ]
                          action: [
                            (SimpleCommand
                              words: [{(echo)} {(DQ ('No tarball for ') ($ VSub_Name '$PACKAGE'))}]
                              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                            )
                            (C {(dienow)})
                          ]
                          spids: [16777215 913]
                        )
                      ]
                      spids: [16777215 930]
                    )
                    (AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-e)} {(DQ ($ VSub_Name '$SHA1FILE'))} 
                          {(Lit_Other ']')}
                        )
                        (C {(patch_package)})
                      ]
                    )
                    (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
                  ]
                  spids: [16777215 893]
                )
              ]
              spids: [16777215 960]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:SHA1TAR)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [(C {(sha1file)} {(DQ ($ VSub_Name '$FILENAME'))})]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [975 981]
                        )
                      )
                    }
                  spids: [973]
                )
              ]
              spids: [973]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:SHALIST)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (SimpleCommand
                                words: [{(cat)} {(DQ ($ VSub_Name '$SHA1FILE'))}]
                                redirects: [(Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [986 996]
                      )
                    }
                  spids: [985]
                )
              ]
              spids: [985]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$SHALIST'))} 
                      {(Lit_Other ']')}
                    )
                  ]
                  action: [
                    (ForEach
                      iter_name: i
                      iter_words: [
                        {(DQ ($ VSub_Name '$SHA1TAR'))}
                        {
                          (CommandSubPart
                            command_list: 
                              (CommandList
                                children: [
                                  (C {(sha1file)} 
                                    {
                                      (CommandSubPart
                                        command_list: (CommandList children:[(C {(gather_patches)})])
                                        left_token: <Left_CommandSub '$('>
                                        spids: [1030 1032]
                                      )
                                    }
                                  )
                                ]
                              )
                            left_token: <Left_CommandSub '$('>
                            spids: [1027 1033]
                          )
                        }
                      ]
                      do_arg_iter: F
                      body: 
                        (DoGroup
                          children: [
                            (If
                              arms: [
                                (if_arm
                                  cond: [
                                    (C {(Lit_Other '[')} {(-z)} 
                                      {
                                        (DQ 
                                          (CommandSubPart
                                            command_list: 
                                              (CommandList
                                                children: [
                                                  (Pipeline
                                                    children: [
                                                      (C {(echo)} {(DQ ($ VSub_Name '$SHALIST'))})
                                                      (C {(grep)} {(DQ ($ VSub_Name '$i'))})
                                                    ]
                                                    negated: F
                                                  )
                                                ]
                                              )
                                            left_token: <Left_CommandSub '$('>
                                            spids: [1050 1064]
                                          )
                                        )
                                      } {(Lit_Other ']')}
                                    )
                                  ]
                                  action: [
                                    (Assignment
                                      keyword: Assign_None
                                      pairs: [
                                        (assign_pair
                                          lhs: (LhsName name:SHALIST)
                                          op: Equal
                                          rhs: {(missing)}
                                          spids: [1073]
                                        )
                                      ]
                                      spids: [1073]
                                    )
                                    (ControlFlow
                                      token: <ControlFlow_Break break>
                                    )
                                  ]
                                  spids: [16777215 1070]
                                )
                              ]
                              spids: [16777215 1080]
                            )
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:SHALIST)
                                  op: Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (CommandSubPart
                                          command_list: 
                                            (CommandList
                                              children: [
                                                (Pipeline
                                                  children: [
                                                    (C {(echo)} {(DQ ($ VSub_Name '$SHALIST'))})
                                                    (C {(sed)} {(DQ (s/) ($ VSub_Name '$i') (//))})
                                                  ]
                                                  negated: F
                                                )
                                              ]
                                            )
                                          left_token: <Left_CommandSub '$('>
                                          spids: [1089 1106]
                                        )
                                      )
                                    }
                                  spids: [1087]
                                )
                              ]
                              spids: [1087]
                            )
                          ]
                          spids: [1036 1110]
                        )
                      spids: [1022 16777215]
                    )
                    (AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$SHALIST'))} {(Lit_Other ']')})
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                    )
                  ]
                  spids: [16777215 1014]
                )
              ]
              spids: [16777215 1134]
            )
            (C {(echo)} {(-n)} {(DQ ("Extracting '") ($ VSub_Name '$PACKAGE') ("'"))})
            (Subshell
              child: 
                (CommandList
                  children: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:UNIQUE)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [(C {(readlink)} {(/proc/self)})]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [1158 1162]
                              )
                            }
                          spids: [1157]
                        )
                      ]
                      spids: [1157]
                    )
                    (C {(trap)} {(SQ <'rm -rf "$BUILD/temp-'>) ($ VSub_Name '$UNIQUE') (SQ <'"'>)} 
                      {(EXIT)}
                    )
                    (SimpleCommand
                      words: [{(rm)} {(-rf)} {(DQ ($ VSub_Name '$SRCTREE') (/) ($ VSub_Name '$PACKAGE'))}]
                      redirects: [(Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
                    )
                    (AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(mkdir)} {(-p)} 
                          {(DQ ($ VSub_Name '$BUILD') (/temp-) ($ VSub_Name '$UNIQUE'))} {(DQ ($ VSub_Name '$SRCTREE'))}
                        )
                        (C {(dienow)})
                      ]
                    )
                    (Pipeline
                      children: [
                        (BraceGroup
                          children: [
                            (AndOr
                              ops: [Op_DAmp Op_DAmp]
                              children: [
                                (C {(tar)} {(-xv) (${ VSub_Name DECOMPRESS)} {(-f)} 
                                  {(DQ ($ VSub_Name '$FILENAME'))} {(-C)} {(DQ ($ VSub_Name '$BUILD') (/temp-) ($ VSub_Name '$UNIQUE'))}
                                )
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:TARDIR)
                                      op: Equal
                                      rhs: 
                                        {
                                          (DQ 
                                            (CommandSubPart
                                              command_list: 
                                                (CommandList
                                                  children: [
                                                    (C {(readlink)} {(-f)} 
                                                      {
                                                        (DQ ($ VSub_Name '$BUILD') (/temp-) 
                                                          ($ VSub_Name '$UNIQUE')
                                                        ) (/) (Lit_Other '*')
                                                      }
                                                    )
                                                  ]
                                                )
                                              left_token: <Left_CommandSub '$('>
                                              spids: [1248 1260]
                                            )
                                          )
                                        }
                                      spids: [1246]
                                    )
                                  ]
                                  spids: [1246]
                                )
                                (C {(touch)} 
                                  {(DQ ($ VSub_Name '$TARDIR') (/) ($ VSub_Name '$SHA1NAME'))}
                                )
                              ]
                            )
                          ]
                          spids: [1212]
                        )
                        (C {(dotprogress)})
                      ]
                      negated: F
                    )
                    (AndOr
                      ops: [Op_DAmp Op_DAmp]
                      children: [
                        (C {(Lit_Other '[')} {(-e)} 
                          {(DQ ($ VSub_Name '$BUILD') (/temp-) ($ VSub_Name '$UNIQUE')) (/) 
                            (Lit_Other '*') (/) (DQ ($ VSub_Name '$SHA1NAME'))
                          } {(Lit_Other ']')}
                        )
                        (C {(mv)} 
                          {(DQ ($ VSub_Name '$BUILD') (/temp-) ($ VSub_Name '$UNIQUE') (/)) 
                            (Lit_Other '*')
                          } {(DQ ($ VSub_Name '$SRCTREE') (/) ($ VSub_Name '$PACKAGE'))}
                        )
                        (SimpleCommand
                          words: [{(echo)} {(DQ ($ VSub_Name '$SHA1TAR'))}]
                          redirects: [
                            (Redir
                              op: <Redir_DGreat '>>'>
                              fd: 16777215
                              arg_word: {(DQ ($ VSub_Name '$SHA1FILE'))}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
              spids: [1154 1336]
            )
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-ne)} {(0)} {(Lit_Other ']')})
                (C {(dienow)})
              ]
            )
            (C {(patch_package)})
          ]
          spids: [697]
        )
      spids: [693 696]
    )
    (FuncDef
      name: confirm_checksum
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:SUM)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (SimpleCommand
                                  words: [
                                    {(sha1file)}
                                    {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$FILENAME'))}
                                  ]
                                  redirects: [(Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [1377 1388]
                        )
                      )
                    }
                  spids: [1375]
                )
              ]
              spids: [1375]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (AndOr
                      ops: [Op_DPipe Op_DAmp]
                      children: [
                        (C {(Lit_Other '[')} {(x) (DQ ($ VSub_Name '$SUM'))} 
                          {(Lit_Other '=') (Lit_Other '=')} {(x) (DQ ($ VSub_Name '$SHA1'))} {(Lit_Other ']')}
                        )
                        (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$SHA1'))} {(Lit_Other ']')})
                        (C {(Lit_Other '[')} {(-f)} 
                          {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$FILENAME'))} {(Lit_Other ']')}
                        )
                      ]
                    )
                  ]
                  action: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$SHA1'))} {(Lit_Other ']')})
                          ]
                          action: [
                            (C {(echo)} 
                              {
                                (DQ ('No SHA1 for ') ($ VSub_Name '$FILENAME') (' (') 
                                  ($ VSub_Name '$SUM') (')')
                                )
                              }
                            )
                          ]
                          spids: [16777215 1454]
                        )
                      ]
                      else_action: [(C {(echo)} {(DQ ('Confirmed ') ($ VSub_Name '$FILENAME'))})]
                      spids: [1468 1479]
                    )
                    (AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$EXTRACT_ALL'))} {(Lit_Other ']')})
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                    )
                    (C {(extract_package)} {(DQ ($ VSub_Name '$BASENAME'))})
                    (ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {($ VSub_QMark '$?')}
                    )
                  ]
                  spids: [16777215 1438]
                )
              ]
              spids: [16777215 1517]
            )
            (C {(rm)} {(-f)} {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$FILENAME'))})
            (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
          ]
          spids: [1372]
        )
      spids: [1368 1371]
    )
    (FuncDef
      name: download_from
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(confirm_checksum)})
                (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
              ]
            )
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ']')})
                (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
              ]
            )
            (AndOr
              ops: [Op_DPipe]
              children: [
                (C {(wget)} {(-t)} {(2)} {(-T)} {(20)} {(-O)} 
                  {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$FILENAME'))} {(DQ ($ VSub_Number '$1'))}
                )
                (Subshell
                  child: 
                    (CommandList
                      children: [
                        (Sentence
                          child: 
                            (C {(rm)} {(-f)} {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$FILENAME'))})
                          terminator: <Op_Semi ';'>
                        )
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(2)}
                        )
                      ]
                    )
                  spids: [1622 1637]
                )
              ]
            )
            (C {(touch)} {(-c)} {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$FILENAME'))})
            (C {(confirm_checksum)})
          ]
          spids: [1557]
        )
      spids: [1553 1556]
    )
    (FuncDef
      name: download
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:FILENAME)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [
                                  (C {(echo)} {(DQ ($ VSub_Name '$URL'))})
                                  (C {(sed)} {(SQ <'s .*/  '>)})
                                ]
                                negated: F
                              )
                            ]
                          )
                        left_token: <Left_Backtick '`'>
                        spids: [1669 1683]
                      )
                    }
                  spids: [1668]
                )
              ]
              spids: [1668]
            )
            (AndOr
              ops: [Op_DPipe]
              children: [
                (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$RENAME'))} {(Lit_Other ']')})
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:FILENAME)
                      op: Equal
                      rhs: 
                        {
                          (DQ 
                            (CommandSubPart
                              command_list: 
                                (CommandList
                                  children: [
                                    (Pipeline
                                      children: [
                                        (C {(echo)} {(DQ ($ VSub_Name '$FILENAME'))})
                                        (C {(sed)} {(-r)} {(DQ ($ VSub_Name '$RENAME'))})
                                      ]
                                      negated: F
                                    )
                                  ]
                                )
                              left_token: <Left_CommandSub '$('>
                              spids: [1700 1716]
                            )
                          )
                        }
                      spids: [1698]
                    )
                  ]
                  spids: [1698]
                )
              ]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (C {(Lit_Other '[')} {(-z)} 
                      {
                        (DQ 
                          (CommandSubPart
                            command_list: 
                              (CommandList
                                children: [
                                  (SimpleCommand
                                    words: [{(sha1sum)}]
                                    redirects: [
                                      (Redir
                                        op: <Redir_Less '<'>
                                        fd: 16777215
                                        arg_word: {(/dev/null)}
                                      )
                                    ]
                                  )
                                ]
                              )
                            left_token: <Left_CommandSub '$('>
                            spids: [1728 1734]
                          )
                        )
                      } {(Lit_Other ']')}
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [{(echo)} {(DQ ('Error: please install sha1sum'))}]
                      redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                    )
                    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
                  ]
                  spids: [16777215 1740]
                )
              ]
              spids: [16777215 1758]
            )
            (C {(echo)} {(-ne)} {(DQ ('checking ') ($ VSub_Name '$FILENAME') (Lit_Other '\\') (r))})
            (SimpleCommand
              words: [{(touch)} {(-c)} {(DQ ($ VSub_Name '$SRCDIR')) (/) (DQ ($ VSub_Name '$FILENAME'))}]
              redirects: [(Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:BASENAME)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [(C {(noversion)} {(DQ ($ VSub_Name '$FILENAME'))})]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [1803 1809]
                        )
                      )
                    }
                  spids: [1801]
                )
              ]
              spids: [1801]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (AndOr
                      ops: [Op_DAmp]
                      children: [
                        (Pipeline
                          children: [
                            (C {(is_in_list)} {(DQ ($ VSub_Name '$BASENAME'))} 
                              {(DQ ($ VSub_Name '$IGNORE_REPOS'))}
                            )
                          ]
                          negated: T
                        )
                        (C {(Lit_Other '[')} {(-d)} 
                          {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$BASENAME'))} {(Lit_Other ']')}
                        )
                      ]
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ('Using ') ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$BASENAME'))})
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$EXTRACT_ALL'))} 
                              {(Lit_Other '=') (Lit_Other '=')} {(force)} {(Lit_Other ']')}
                            )
                          ]
                          action: [
                            (AndOr
                              ops: [Op_DAmp Op_DPipe]
                              children: [
                                (C {(rm)} {(-rf)} 
                                  {(DQ ($ VSub_Name '$SRCTREE') (/) ($ VSub_Name '$BASENAME'))}
                                )
                                (C {(cp)} {(-a)} 
                                  {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$BASENAME'))} {(DQ ($ VSub_Name '$SRCTREE') (/) ($ VSub_Name '$BASENAME'))}
                                )
                                (C {(dienow)})
                              ]
                            )
                          ]
                          spids: [16777215 1871]
                        )
                      ]
                      spids: [16777215 1908]
                    )
                    (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
                  ]
                  spids: [16777215 1842]
                )
              ]
              spids: [16777215 1917]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$PREFERRED_MIRROR'))} 
                      {(Lit_Other ']')}
                    )
                  ]
                  action: [
                    (AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(download_from)} 
                          {(DQ ($ VSub_Name '$PREFERRED_MIRROR') (/) ($ VSub_Name '$FILENAME'))}
                        )
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                    )
                  ]
                  spids: [16777215 1941]
                )
              ]
              spids: [16777215 1959]
            )
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(download_from)} {(DQ ($ VSub_Name '$URL'))})
                (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
              ]
            )
            (ForEach
              iter_name: i
              iter_words: [{($ VSub_Name '$MIRROR_LIST')}]
              do_arg_iter: F
              body: 
                (DoGroup
                  children: [
                    (AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(download_from)} {(DQ ($ VSub_Name '$i') (/) ($ VSub_Name '$FILENAME'))})
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(0)}
                        )
                      ]
                    )
                  ]
                  spids: [1994 2012]
                )
              spids: [1990 16777215]
            )
            (C {(echo)} {(DQ ('Could not download ') ($ VSub_Name '$FILENAME'))})
            (C {(echo)} {(-en)} {(DQ (Lit_Other '\\') ('e[0m'))})
            (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
          ]
          spids: [1665]
        )
      spids: [1661 1664]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:START_TIME)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [(C {(date)} {(Lit_Other '+') (Lit_Other '%') (s)})]
                  )
                left_token: <Left_Backtick '`'>
                spids: [2051 2057]
              )
            }
          spids: [2050]
        )
      ]
      spids: [2050]
    )
    (FuncDef
      name: cleanup_oldfiles
      body: 
        (BraceGroup
          children: [
            (C {(wait)})
            (ForEach
              iter_name: i
              iter_words: [{(DQ (${ VSub_Name SRCDIR)) (/) (Lit_Other '*')}]
              do_arg_iter: F
              body: 
                (DoGroup
                  children: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (AndOr
                              ops: [Op_DAmp]
                              children: [
                                (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$i'))} {(Lit_Other ']')})
                                (C {(Lit_Other '[')} 
                                  {
                                    (DQ 
                                      (CommandSubPart
                                        command_list: 
                                          (CommandList
                                            children: [
                                              (C {(date)} {(Lit_Other '+') (Lit_Other '%') (s)} {(-r)} 
                                                {(DQ ($ VSub_Name '$i'))}
                                              )
                                            ]
                                          )
                                        left_token: <Left_CommandSub '$('>
                                        spids: [2111 2123]
                                      )
                                    )
                                  } {(-lt)} {(DQ (${ VSub_Name START_TIME))} {(Lit_Other ']')}
                                )
                              ]
                            )
                          ]
                          action: [
                            (C {(echo)} {(Removing)} {(old)} {(file)} {(DQ ($ VSub_Name '$i'))})
                            (C {(rm)} {(-rf)} {(DQ ($ VSub_Name '$i'))})
                          ]
                          spids: [16777215 2137]
                        )
                      ]
                      spids: [16777215 2162]
                    )
                  ]
                  spids: [2091 2165]
                )
              spids: [2081 16777215]
            )
          ]
          spids: [2064]
        )
      spids: [2060 2063]
    )
  ]
)