(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:currentVersion) op:Equal rhs:{(DQ (1.11.1))} spids:[6])]
      spids: [6]
    )
    (Assignment
      keyword: Assign_Declare
      flags: [-a]
      pairs: [
        (assign_pair
          lhs: (LhsName name:tools)
          op: Equal
          rhs: 
            {
              (ArrayLiteralPart
                words: [
                  {(currency)}
                  {(stocks)}
                  {(weather)}
                  {(crypt)}
                  {(movies)}
                  {(taste)}
                  {(short)}
                  {(geo)}
                  {(cheat)}
                  {(ytview)}
                  {(cloudup)}
                  {(qrify)}
                ]
              )
            }
          spids: [15]
        )
      ]
      spids: [11]
    )
    (FuncDef
      name: askInstall
      body: 
        (BraceGroup
          children: [
            (C {(echo)} {(-n)} {(DQ ('Do you wish to install ') ($ VSub_Number '$1') (' [Y/n]: '))})
            (C {(read)} {(-r)} {(answer)})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (LogicalOr
                              left: 
                                (BoolBinary
                                  op_id: BoolBinary_GlobDEqual
                                  left: {(DQ ($ VSub_Name '$answer'))}
                                  right: {(DQ (Y))}
                                )
                              right: 
                                (BoolBinary
                                  op_id: BoolBinary_GlobDEqual
                                  left: {(DQ ($ VSub_Name '$answer'))}
                                  right: {(DQ (y))}
                                )
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(cd)} {($ VSub_Number '$1')})
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(1)}
                        )
                      ]
                    )
                    (C {(echo)} {(-n)} {(DQ ('Installing ') ($ VSub_Number '$1') (': '))})
                    (C {(chmod)} {(a) (Lit_Other '+') (x)} {($ VSub_Number '$1')})
                    (AndOr
                      ops: [Op_DPipe]
                      children: [
                        (SimpleCommand
                          words: [{(cp)} {($ VSub_Number '$1')} {(/usr/local/bin)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 16777215
                              arg_word: {(/dev/null)}
                              spids: [137]
                            )
                            (Redir
                              op_id: Redir_GreatAnd
                              fd: 2
                              arg_word: {(1)}
                              spids: [141]
                            )
                          ]
                        )
                        (BraceGroup
                          children: [
                            (Sentence
                              child: (C {(echo)} {(DQ (Failure))})
                              terminator: <Op_Semi ';'>
                            )
                            (Sentence
                              child: 
                                (C {(echo)} 
                                  {(DQ ('Error copying file, try running install script as sudo'))}
                                )
                              terminator: <Op_Semi ';'>
                            )
                            (Sentence
                              child: (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          spids: [146]
                        )
                      ]
                    )
                    (C {(echo)} {(DQ (Success))})
                    (AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(cd)} {(..)})
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(1)}
                        )
                      ]
                    )
                  ]
                  spids: [16777215 97]
                )
              ]
              spids: [16777215 188]
            )
          ]
          spids: [47]
        )
      spids: [43 46]
    )
    (FuncDef
      name: updateTool
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolUnary
                              op_id: BoolUnary_f
                              child: {(/usr/local/bin/) ($ VSub_Number '$1')}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(cd)} {($ VSub_Number '$1')})
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(1)}
                        )
                      ]
                    )
                    (C {(echo)} {(-n)} {(DQ ('Installing ') ($ VSub_Number '$1') (': '))})
                    (C {(chmod)} {(a) (Lit_Other '+') (x)} {($ VSub_Number '$1')})
                    (AndOr
                      ops: [Op_DPipe]
                      children: [
                        (SimpleCommand
                          words: [{(cp)} {($ VSub_Number '$1')} {(/usr/local/bin)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 16777215
                              arg_word: {(/dev/null)}
                              spids: [251]
                            )
                            (Redir
                              op_id: Redir_GreatAnd
                              fd: 2
                              arg_word: {(1)}
                              spids: [255]
                            )
                          ]
                        )
                        (BraceGroup
                          children: [
                            (Sentence
                              child: (C {(echo)} {(DQ (Failure))})
                              terminator: <Op_Semi ';'>
                            )
                            (Sentence
                              child: 
                                (C {(echo)} 
                                  {(DQ ('Error copying file, try running install script as sudo'))}
                                )
                              terminator: <Op_Semi ';'>
                            )
                            (Sentence
                              child: (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          spids: [260]
                        )
                      ]
                    )
                    (C {(echo)} {(DQ (Success))})
                    (AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(cd)} {(..)})
                        (ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {(1)}
                        )
                      ]
                    )
                  ]
                  spids: [16777215 211]
                )
              ]
              spids: [16777215 302]
            )
          ]
          spids: [197]
        )
      spids: [193 196]
    )
    (FuncDef
      name: singleInstall
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DPipe]
              children: [
                (C {(cd)} {($ VSub_Number '$1')})
                (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
              ]
            )
            (C {(echo)} {(-n)} {(DQ ('Installing ') ($ VSub_Number '$1') (': '))})
            (C {(chmod)} {(a) (Lit_Other '+') (x)} {($ VSub_Number '$1')})
            (AndOr
              ops: [Op_DPipe]
              children: [
                (SimpleCommand
                  words: [{(cp)} {($ VSub_Number '$1')} {(/usr/local/bin)}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 16777215
                      arg_word: {(/dev/null)}
                      spids: [351]
                    )
                    (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[355])
                  ]
                )
                (BraceGroup
                  children: [
                    (Sentence
                      child: (C {(echo)} {(DQ (Failure))})
                      terminator: <Op_Semi ';'>
                    )
                    (Sentence
                      child: 
                        (C {(echo)} {(DQ ('Error copying file, try running install script as sudo'))})
                      terminator: <Op_Semi ';'>
                    )
                    (Sentence
                      child: (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [360]
                )
              ]
            )
            (C {(echo)} {(DQ (Success))})
            (AndOr
              ops: [Op_DPipe]
              children: [(C {(cd)} {(..)}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})]
            )
          ]
          spids: [311]
        )
      spids: [307 310]
    )
    (FuncDef
      name: copyManpage
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DPipe]
              children: [
                (SimpleCommand
                  words: [{(cp)} {(bash-snippets.1)} {(/usr/local/man/man1)}]
                  redirects: [(Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[417])]
                )
                (BraceGroup
                  children: [
                    (Sentence
                      child: (C {(echo)} {(DQ (Failure))})
                      terminator: <Op_Semi ';'>
                    )
                    (Sentence
                      child: 
                        (C {(echo)} {(DQ ('Error copying file, try running install script as sudo'))})
                      terminator: <Op_Semi ';'>
                    )
                    (Sentence
                      child: (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [422]
                )
              ]
            )
          ]
          spids: [408]
        )
      spids: [404 407]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (DBracket
                  expr: (BoolBinary op_id:BoolBinary_GlobDEqual left:{($ VSub_Pound '$#')} right:{(0)})
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (ForEach
              iter_name: tool
              iter_words: [
                {
                  (DQ 
                    (BracedVarSub
                      token: <VSub_Name tools>
                      bracket_op: (WholeArray op_id:Lit_At)
                      spids: [471 476]
                    )
                  )
                }
              ]
              do_arg_iter: F
              body: 
                (DoGroup
                  children: [
                    (AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(askInstall)} {($ VSub_Name '$tool')})
                        (ControlFlow
                          token: <ControlFlow_Exit exit>
                          arg_word: {(1)}
                        )
                      ]
                    )
                  ]
                  spids: [480 494]
                )
              spids: [469 16777215]
            )
            (AndOr
              ops: [Op_DPipe]
              children: [(C {(copyManpage)}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})]
            )
          ]
          spids: [16777215 461]
        )
        (if_arm
          cond: [
            (Sentence
              child: 
                (DBracket
                  expr: 
                    (BoolBinary
                      op_id: BoolBinary_GlobDEqual
                      left: {($ VSub_Number '$1')}
                      right: {(DQ (update))}
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('Updating scripts...'))})
            (ForEach
              iter_name: tool
              iter_words: [
                {
                  (DQ 
                    (BracedVarSub
                      token: <VSub_Name tools>
                      bracket_op: (WholeArray op_id:Lit_At)
                      spids: [537 542]
                    )
                  )
                }
              ]
              do_arg_iter: F
              body: 
                (DoGroup
                  children: [
                    (AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(updateTool)} {($ VSub_Name '$tool')})
                        (ControlFlow
                          token: <ControlFlow_Exit exit>
                          arg_word: {(1)}
                        )
                      ]
                    )
                  ]
                  spids: [546 560]
                )
              spids: [535 16777215]
            )
            (AndOr
              ops: [Op_DPipe]
              children: [(C {(copyManpage)}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})]
            )
          ]
          spids: [505 520]
        )
        (if_arm
          cond: [
            (Sentence
              child: 
                (DBracket
                  expr: 
                    (BoolBinary
                      op_id: BoolBinary_GlobDEqual
                      left: {($ VSub_Number '$1')}
                      right: {(DQ (all))}
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (ForEach
              iter_name: tool
              iter_words: [
                {
                  (DQ 
                    (BracedVarSub
                      token: <VSub_Name tools>
                      bracket_op: (WholeArray op_id:Lit_At)
                      spids: [595 600]
                    )
                  )
                }
              ]
              do_arg_iter: F
              body: 
                (DoGroup
                  children: [
                    (AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(singleInstall)} {($ VSub_Name '$tool')})
                        (ControlFlow
                          token: <ControlFlow_Exit exit>
                          arg_word: {(1)}
                        )
                      ]
                    )
                  ]
                  spids: [604 618]
                )
              spids: [593 16777215]
            )
            (AndOr
              ops: [Op_DPipe]
              children: [(C {(copyManpage)}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})]
            )
          ]
          spids: [571 585]
        )
      ]
      else_action: [
        (AndOr
          ops: [Op_DPipe]
          children: [
            (C {(singleInstall)} {($ VSub_Number '$1')})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
        )
        (AndOr
          ops: [Op_DPipe]
          children: [(C {(copyManpage)}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})]
        )
      ]
      spids: [629 651]
    )
    (C {(echo)} {(-n)} {(DQ ('( \xe2\x80\xa2_\xe2\x80\xa2)'))})
    (C {(sleep)} {(.75)})
    (C {(echo)} {(-n)} {(-e)} 
      {(DQ (Lit_Other '\\') ('r( \xe2\x80\xa2_\xe2\x80\xa2)>\xe2\x8c\x90\xe2\x96\xa0-\xe2\x96\xa0'))}
    )
    (C {(sleep)} {(.75)})
    (C {(echo)} {(-n)} {(-e)} {(DQ (Lit_Other '\\') ('r               '))})
    (C {(echo)} {(-e)} {(DQ (Lit_Other '\\') ('r(\xe2\x8c\x90\xe2\x96\xa0_\xe2\x96\xa0)'))})
    (C {(sleep)} {(.5)})
    (C {(echo)} {(DQ ('Bash Snippets version ') ($ VSub_Name '$currentVersion'))})
    (C {(echo)} {(DQ ('https://github.com/alexanderepstein/Bash-Snippets'))})
  ]
)