(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:currentVersion)
          op: assign_op.Equal
          rhs: {(DQ <1.11.1>)}
          spids: [7]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:LANG)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (braced_var_sub
                  token: <Id.VSub_Name LANG>
                  suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{<en>})
                )
              )
            }
          spids: [15]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:locale)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_DollarParen '$('>
                command_list: 
                  (command.CommandList
                    children: [
                      (command.Pipeline
                        children: [(C {<echo>} {($ Id.VSub_DollarName '$LANG')}) (C {<cut>} {<-c1-2>})]
                        negated: F
                      )
                    ]
                  )
              )
            }
          spids: [24]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:configuredClient)
          op: assign_op.Equal
          rhs: {(DQ )}
          spids: [37]
        )
      ]
    )
    (command.ShFunction
      name: getConfiguredClient
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          words: [{<command>} {<-v>} {<curl>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_AndGreat '&>'>
                              fd: -1
                              arg_word: {</dev/null>}
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:configuredClient)
                          op: assign_op.Equal
                          rhs: {(DQ <curl>)}
                          spids: [68]
                        )
                      ]
                    )
                  ]
                  spids: [52 65]
                )
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          words: [{<command>} {<-v>} {<wget>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_AndGreat '&>'>
                              fd: -1
                              arg_word: {</dev/null>}
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:configuredClient)
                          op: assign_op.Equal
                          rhs: {(DQ <wget>)}
                          spids: [90]
                        )
                      ]
                    )
                  ]
                  spids: [74 87]
                )
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          words: [{<command>} {<-v>} {<fetch>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_AndGreat '&>'>
                              fd: -1
                              arg_word: {</dev/null>}
                            )
                          ]
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:configuredClient)
                          op: assign_op.Equal
                          rhs: {(DQ <fetch>)}
                          spids: [112]
                        )
                      ]
                    )
                  ]
                  spids: [96 109]
                )
              ]
              else_action: [
                (C {<echo>} 
                  {(DQ <'Error: This tool reqires either curl, wget, or fetch to be installed.'>)}
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: httpGet
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$configuredClient'))}
              arms: [
                (case_arm
                  pat_list: [{<curl>}]
                  action: [(C {<curl>} {<-A>} {<curl>} {<-s>} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [158 159 172 -1]
                )
                (case_arm
                  pat_list: [{<wget>}]
                  action: [(C {<wget>} {<-qO->} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [175 176 185 -1]
                )
                (case_arm
                  pat_list: [{<fetch>}]
                  action: [(C {<fetch>} {<-o>} {(DQ <...>)})]
                  spids: [188 189 198 -1]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: getIPWeather
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:country)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [(C {<httpGet>} {<ipinfo.io/country>})]
                          )
                      )
                    }
                  spids: [214]
                )
              ]
              redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{</dev/null>})]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_GlobDEqual
                              left: {($ Id.VSub_DollarName '$country')}
                              right: {(DQ <US>)}
                            )
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:city)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [(C {<httpGet>} {<ipinfo.io/city>})]
                                  )
                              )
                            }
                          spids: [249]
                        )
                      ]
                      redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{</dev/null>})]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:region)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [(C {<httpGet>} {<ipinfo.io/region>})]
                                  )
                              )
                            }
                          spids: [261]
                        )
                      ]
                      redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{</dev/null>})]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:region)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {<echo>} {(DQ ($ Id.VSub_DollarName '$region'))})
                                          (C {<tr>} {<-dc>} {(SQ <'[:upper:]'>)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [273]
                        )
                      ]
                    )
                    (C {<httpGet>} 
                      {($ Id.VSub_DollarName '$locale') <.wttr.in/> ($ Id.VSub_DollarName '$city') 
                        <Id.Lit_Comma ','> ($ Id.VSub_DollarName '$region') ($ Id.VSub_Number '$1')
                      }
                    )
                  ]
                  spids: [229 243]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:location)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Id.Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [(C {<httpGet>} {<ipinfo.io/loc>})]
                              )
                          )
                        }
                      spids: [309]
                    )
                  ]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{</dev/null>})]
                )
                (C {<httpGet>} 
                  {($ Id.VSub_DollarName '$locale') <.wttr.in/> ($ Id.VSub_DollarName '$location') 
                    ($ Id.VSub_Number '$1')
                  }
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: getLocationWeather
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:args)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {<echo>} {(DQ ($ Id.VSub_At '$@'))})
                                  (C {<tr>} {(DQ <' '>)} {<Id.Lit_Other '+'>})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [341]
                )
              ]
            )
            (C {<httpGet>} {($ Id.VSub_DollarName '$locale') <.wttr.in/> (${ Id.VSub_Name args)})
          ]
        )
    )
    (command.ShFunction
      name: checkInternet
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<echo>} 
                  {
                    (DQ <'GET http://google.com HTTP/1.0'> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> 
                      <n>
                    )
                  }
                )
                (command.Simple
                  words: [{<nc>} {<google.com>} {<80>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {</dev/null>}
                    )
                    (redir.Redir op:<Id.Redir_GreatAnd '2>&'> fd:2 arg_word:{<1>})
                  ]
                )
              ]
              negated: F
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [409 422]
                )
              ]
              else_action: [
                (command.Simple
                  words: [{<echo>} {(DQ <'Error: no active internet connection'>)}]
                  redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: update
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:repositoryName)
                  op: assign_op.Equal
                  rhs: {(DQ <Bash-Snippets>)}
                  spids: [478]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:githubUserName)
                  op: assign_op.Equal
                  rhs: {(DQ <alexanderepstein>)}
                  spids: [487]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:nameOfInstallFile)
                  op: assign_op.Equal
                  rhs: {(DQ <install.sh>)}
                  spids: [496]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:latestVersion)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {<httpGet>} 
                                    {<https> <Id.Lit_Other ':'> <//api.github.com/repos/> 
                                      ($ Id.VSub_DollarName '$githubUserName') </> ($ Id.VSub_DollarName '$repositoryName') </tags>
                                    }
                                  )
                                  (C {<grep>} {<-Eo>} {(SQ <'"name":.*?[^\\\\]",'>)})
                                  (C {<head>} {<-1>})
                                  (C {<grep>} {<-Eo>} {(DQ <'[0-9.]+'>)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [505]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.LogicalOr
                              left: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {($ Id.VSub_DollarName '$currentVersion')}
                                  right: {(DQ )}
                                )
                              right: 
                                (bool_expr.LogicalOr
                                  left: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobDEqual
                                      left: {($ Id.VSub_DollarName '$repositoryName')}
                                      right: {(DQ )}
                                    )
                                  right: 
                                    (bool_expr.LogicalOr
                                      left: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_GlobDEqual
                                          left: {($ Id.VSub_DollarName '$githubUserName')}
                                          right: {(DQ )}
                                        )
                                      right: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_GlobDEqual
                                          left: {($ Id.VSub_DollarName '$nameOfInstallFile')}
                                          right: {(DQ )}
                                        )
                                    )
                                )
                            )
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {(DQ <'Error: update utility has not been configured correctly.'>)}
                      ]
                      redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [549 589]
                )
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_GlobDEqual
                              left: {($ Id.VSub_DollarName '$latestVersion')}
                              right: {(DQ )}
                            )
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'Error: no active internet connection'>)}]
                      redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [607 620]
                )
              ]
              else_action: [
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobNEqual
                                  left: {(DQ ($ Id.VSub_DollarName '$latestVersion'))}
                                  right: {(DQ ($ Id.VSub_DollarName '$currentVersion'))}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                      action: [
                        (C {<echo>} 
                          {(DQ <'Version '> ($ Id.VSub_DollarName '$latestVersion') <' available'>)}
                        )
                        (C {<echo>} {<-n>} 
                          {
                            (DQ <'Do you wish to update '> ($ Id.VSub_DollarName '$repositoryName') 
                              <' [Y/n]: '>
                            )
                          }
                        )
                        (C {<read>} {<-r>} {<answer>})
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.LogicalOr
                                          left: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_GlobDEqual
                                              left: {(DQ ($ Id.VSub_DollarName '$answer'))}
                                              right: {(DQ <Y>)}
                                            )
                                          right: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_GlobDEqual
                                              left: {(DQ ($ Id.VSub_DollarName '$answer'))}
                                              right: {(DQ <y>)}
                                            )
                                        )
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                              action: [
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<cd>} {(word_part.TildeSub token:<Id.Lit_TildeLike '~'>)})
                                    (command.BraceGroup
                                      children: [
                                        (command.Sentence
                                          child: (C {<echo>} {(SQ <'Update Failed'>)})
                                          terminator: <Id.Op_Semi _>
                                        )
                                        (command.Sentence
                                          child: 
                                            (command.ControlFlow
                                              token: <Id.ControlFlow_Exit exit>
                                              arg_word: {<1>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  ]
                                )
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: [
                                        (command.Sentence
                                          child: 
                                            (command.DBracket
                                              expr: 
                                                (bool_expr.Unary
                                                  op_id: Id.BoolUnary_d
                                                  child: 
                                                    {<Id.Lit_TildeLike '~'> </> 
                                                      ($ Id.VSub_DollarName '$repositoryName')
                                                    }
                                                )
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      action: [
                                        (command.Sentence
                                          child: 
                                            (command.AndOr
                                              ops: [Id.Op_DPipe]
                                              children: [
                                                (C {<rm>} {<-r>} {<-f>} 
                                                  {($ Id.VSub_DollarName '$repositoryName')}
                                                )
                                                (command.BraceGroup
                                                  children: [
                                                    (command.Sentence
                                                      child: 
                                                        (C {<echo>} 
                                                          {
                                                            (DQ 
                                                              <
'Permissions Error: try running the update as sudo'
                                                              >
                                                            )
                                                          }
                                                        )
                                                      terminator: <Id.Op_Semi _>
                                                    )
                                                    (command.Sentence
                                                      child: 
                                                        (command.ControlFlow
                                                          token: <Id.ControlFlow_Exit exit>
                                                          arg_word: {<1>}
                                                        )
                                                      terminator: <Id.Op_Semi _>
                                                    )
                                                  ]
                                                )
                                              ]
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                      spids: [745 758]
                                    )
                                  ]
                                )
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<git>} {<clone>} 
                                      {
                                        (DQ <'https://github.com/'> 
                                          ($ Id.VSub_DollarName '$githubUserName') </> ($ Id.VSub_DollarName '$repositoryName')
                                        )
                                      }
                                    )
                                    (command.BraceGroup
                                      children: [
                                        (command.Sentence
                                          child: 
                                            (C {<echo>} {(DQ <"Couldn't download latest version">)})
                                          terminator: <Id.Op_Semi _>
                                        )
                                        (command.Sentence
                                          child: 
                                            (command.ControlFlow
                                              token: <Id.ControlFlow_Exit exit>
                                              arg_word: {<1>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  ]
                                )
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<cd>} {($ Id.VSub_DollarName '$repositoryName')})
                                    (command.BraceGroup
                                      children: [
                                        (command.Sentence
                                          child: (C {<echo>} {(SQ <'Update Failed'>)})
                                          terminator: <Id.Op_Semi _>
                                        )
                                        (command.Sentence
                                          child: 
                                            (command.ControlFlow
                                              token: <Id.ControlFlow_Exit exit>
                                              arg_word: {<1>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  ]
                                )
                                (command.AndOr
                                  ops: [Id.Op_DPipe Id.Op_DPipe]
                                  children: [
                                    (command.Simple
                                      words: [
                                        {<git>}
                                        {<checkout>}
                                        {(DQ <v> ($ Id.VSub_DollarName '$latestVersion'))}
                                      ]
                                      redirects: [
                                        (redir.Redir
                                          op: <Id.Redir_Great '2>'>
                                          fd: 2
                                          arg_word: {</dev/null>}
                                        )
                                      ]
                                    )
                                    (command.Simple
                                      words: [
                                        {<git>}
                                        {<checkout>}
                                        {(DQ ($ Id.VSub_DollarName '$latestVersion'))}
                                      ]
                                      redirects: [
                                        (redir.Redir
                                          op: <Id.Redir_Great '2>'>
                                          fd: 2
                                          arg_word: {</dev/null>}
                                        )
                                      ]
                                    )
                                    (C {<echo>} 
                                      {
                                        (DQ 
                                          <
"Couldn't git checkout to stable release, updating to latest commit."
                                          >
                                        )
                                      }
                                    )
                                  ]
                                )
                                (C {<chmod>} {<a> <Id.Lit_Other '+'> <x>} {<install.sh>})
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<./> ($ Id.VSub_DollarName '$nameOfInstallFile')} 
                                      {(DQ <update>)}
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Exit exit>
                                      arg_word: {<1>}
                                    )
                                  ]
                                )
                                (C {<cd>} {<..>})
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<rm>} {<-r>} {<-f>} {($ Id.VSub_DollarName '$repositoryName')})
                                    (command.BraceGroup
                                      children: [
                                        (command.Sentence
                                          child: 
                                            (C {<echo>} 
                                              {
                                                (DQ 
                                                  <
'Permissions Error: update succesfull but cannot delete temp files located at ~/'
                                                  > ($ Id.VSub_DollarName '$repositoryName') <' delete this directory with sudo'>
                                                )
                                              }
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                        (command.Sentence
                                          child: 
                                            (command.ControlFlow
                                              token: <Id.ControlFlow_Exit exit>
                                              arg_word: {<1>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  ]
                                )
                              ]
                              spids: [688 717]
                            )
                          ]
                          else_action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Exit exit>
                              arg_word: {<1>}
                            )
                          ]
                        )
                      ]
                      spids: [641 658]
                    )
                  ]
                  else_action: [
                    (C {<echo>} 
                      {
                        (DQ ($ Id.VSub_DollarName '$repositoryName') 
                          <' is already the latest version'>
                        )
                      }
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: usage
      body: 
        (command.BraceGroup
          children: [
            (C {<echo>} {(DQ <Weather>)})
            (C {<echo>} 
              {
                (DQ 
                  <
'Description: Provides a 3 day forecast on your current location or a specified location.'
                  >
                )
              }
            )
            (C {<echo>} {(DQ <'  With no flags Weather will default to your current location.'>)})
            (C {<echo>} 
              {
                (DQ 
                  <
'Usage: weather or weather [flag] or weather [country] or weather [city] [state]'
                  >
                )
              }
            )
            (C {<echo>} {(DQ <'  weather [i] get weather in imperial units'>)})
            (C {<echo>} {(DQ <'  weather [m] get weather in metric units'>)})
            (C {<echo>} {(DQ <'  weather [Moon] grabs the phase of the moon'>)})
            (C {<echo>} {(DQ <'  -u Update Bash-Snippet Tools'>)})
            (C {<echo>} {(DQ <'  -h Show the help'>)})
            (C {<echo>} {(DQ <'  -v Get the tool version'>)})
            (C {<echo>} {(DQ <'Examples:'>)})
            (C {<echo>} {(DQ <'  weather'>)})
            (C {<echo>} {(DQ <'  weather Tokyo'>)})
            (C {<echo>} {(DQ <'  weather Moon'>)})
            (C {<echo>} {(DQ <'  weather m'>)})
          ]
        )
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<getConfiguredClient>})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<checkInternet>})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: [(command.Sentence child:(C {<getopts>} {(DQ <uvh>)} {<opt>}) terminator:<Id.Op_Semi _>)]
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_DollarName '$opt')}
              arms: [
                (case_arm
                  pat_list: [{(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\?'>)}]
                  action: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'Invalid option: -'> ($ Id.VSub_DollarName '$OPTARG'))}]
                      redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [1131 1132 1151 -1]
                )
                (case_arm
                  pat_list: [{<h>}]
                  action: [
                    (C {<usage>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [1154 1155 1166 -1]
                )
                (case_arm
                  pat_list: [{<v>}]
                  action: [
                    (C {<echo>} {(DQ <'Version '> ($ Id.VSub_DollarName '$currentVersion'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [1169 1170 1186 -1]
                )
                (case_arm
                  pat_list: [{<u>}]
                  action: [
                    (C {<update>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [1189 1190 1201 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Other ':'>}]
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ <'Option -'> ($ Id.VSub_DollarName '$OPTARG') <' requires an argument.'>)
                        }
                      ]
                      redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [1204 1205 1225 -1]
                )
              ]
            )
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobDEqual
                      left: {($ Id.VSub_Pound '$#')}
                      right: {(DQ <0>)}
                    )
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [(C {<getIPWeather>})]
          spids: [1233 1248]
        )
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobDEqual
                      left: {($ Id.VSub_Number '$1')}
                      right: {(DQ <help>)}
                    )
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [(C {<usage>})]
          spids: [1253 1267]
        )
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobDEqual
                      left: {($ Id.VSub_Number '$1')}
                      right: {(DQ <update>)}
                    )
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [(C {<update>})]
          spids: [1272 1287]
        )
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobDEqual
                      left: {($ Id.VSub_Number '$1')}
                      right: {(DQ <m>)}
                    )
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [(C {<getIPWeather>} {(DQ <'?m'>)})]
          spids: [1292 1307]
        )
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobDEqual
                      left: {($ Id.VSub_Number '$1')}
                      right: {(DQ <i>)}
                    )
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [(C {<getIPWeather>} {(DQ <'?u'>)})]
          spids: [1316 1331]
        )
      ]
      else_action: [(C {<getLocationWeather>} {(DQ ($ Id.VSub_At '$@'))})]
    )
  ]
)