(CommandList
  children: [
    (C {(set)} {(-o)} {(errexit)})
    (C {(set)} {(-o)} {(nounset)})
    (C {(set)} {(-o)} {(pipefail)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:KUBE_ROOT)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [(C {(dirname)} {(DQ (${ VSub_Name BASH_SOURCE))})]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [64 72]
              ) (/..)
            }
          spids: [63]
        )
      ]
      spids: [63]
    )
    (C {(source)} {(DQ (${ VSub_Name KUBE_ROOT) (/cluster/common.sh))})
    (Assignment
      keyword: Assign_Declare
      flags: [-r]
      pairs: [
        (assign_pair
          lhs: (LhsName name:KUBE_RELEASE_BUCKET_URL)
          op: Equal
          rhs: {(DQ ('https://storage.googleapis.com/kubernetes-release'))}
          spids: [90]
        )
      ]
      spids: [86]
    )
    (Assignment
      keyword: Assign_Declare
      flags: [-r]
      pairs: [
        (assign_pair
          lhs: (LhsName name:KUBE_DEV_RELEASE_BUCKET_URL)
          op: Equal
          rhs: {(DQ ('https://storage.googleapis.com/kubernetes-release-dev'))}
          spids: [99]
        )
      ]
      spids: [95]
    )
    (Assignment
      keyword: Assign_Declare
      flags: [-r]
      pairs: [
        (assign_pair
          lhs: (LhsName name:KUBE_TAR_NAME)
          op: Equal
          rhs: {(DQ (kubernetes.tar.gz))}
          spids: [108]
        )
      ]
      spids: [104]
    )
    (FuncDef
      name: usage
      body: 
        (BraceGroup
          children: [
            (C {(echo)} {(DQ (${ VSub_Number 0) (' [-v] <version number or publication>'))})
            (C {(echo)} {(DQ ("  -v:  Don't get tars, just print the version number"))})
            (C {(echo)} {(DQ )})
            (C {(echo)} {(SQ <'  Version number or publication is either a proper version number'>)})
            (C {(echo)} {(SQ <'  (e.g. "v1.0.6", "v1.2.0-alpha.1.881+376438b69c7612") or a version'>)})
            (C {(echo)} {(SQ <'  publication of the form <bucket>/<version> (e.g. "release/stable",'>)})
            (C {(echo)} {(SQ <'  "ci/latest-1").  Some common ones are:'>)})
            (C {(echo)} {(SQ <'    - "release/stable"'>)})
            (C {(echo)} {(SQ <'    - "release/latest"'>)})
            (C {(echo)} {(SQ <'    - "ci/latest"'>)})
            (C {(echo)} {(SQ <'  See the docs on getting builds for more information about version'>)})
            (C {(echo)} {(SQ <'  publication.'>)})
          ]
          spids: [118]
        )
      spids: [114 117]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:print_version) op:Equal rhs:{(false)} spids:[209])]
      spids: [209]
    )
    (While
      cond: [(Sentence child:(C {(getopts)} {(DQ (':vh'))} {(opt)}) terminator:<Op_Semi ';'>)]
      body: 
        (DoGroup
          children: [
            (Case
              to_match: {(${ VSub_Name opt)}
              arms: [
                (case_arm
                  pat_list: [{(v)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:print_version)
                          op: Equal
                          rhs: {(DQ (true))}
                          spids: [240]
                        )
                      ]
                      spids: [240]
                    )
                  ]
                  spids: [236 237 246 16777215]
                )
                (case_arm
                  pat_list: [{(h)}]
                  action: [(C {(usage)}) (C {(exit)} {(0)})]
                  spids: [249 250 261 16777215]
                )
                (case_arm
                  pat_list: [{(EscapedLiteralPart token:<Lit_EscapedChar '\\?'>)}]
                  action: [
                    (SimpleCommand
                      words: [{(echo)} {(DQ ('Invalid option: -') ($ VSub_Name '$OPTARG'))}]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[275])]
                    )
                    (C {(usage)})
                    (C {(exit)} {(1)})
                  ]
                  spids: [264 265 287 16777215]
                )
              ]
              spids: [227 233 290]
            )
          ]
          spids: [224 292]
        )
    )
    (C {(shift)} 
      {
        (ArithSubPart
          anode: 
            (ArithBinary
              op_id: Arith_Minus
              left: (ArithVarRef name:OPTIND)
              right: (ArithWord w:{(Lit_Digits 1)})
            )
          spids: [296 301]
        )
      }
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (DBracket
                  expr: (BoolBinary op_id:BoolBinary_ne left:{($ VSub_Pound '$#')} right:{(1)})
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(usage)}) (C {(exit)} {(1)})]
          spids: [16777215 317]
        )
      ]
      spids: [16777215 327]
    )
    (C {(set_binary_version)} {(DQ (${ VSub_Number 1))})
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (DBracket
                  expr: 
                    (BoolBinary
                      op_id: BoolBinary_GlobDEqual
                      left: {(DQ (${ VSub_Name print_version))}
                      right: {(DQ (true))}
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(echo)} {(DQ (${ VSub_Name KUBE_VERSION))})]
          spids: [16777215 358]
        )
      ]
      else_action: [
        (SimpleCommand
          words: [
            {(echo)}
            {(DQ ('Using version at ') (${ VSub_Number 1) (': ') (${ VSub_Name KUBE_VERSION))}
          ]
          redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[385])]
        )
        (If
          arms: [
            (if_arm
              cond: [
                (Sentence
                  child: 
                    (DBracket
                      expr: 
                        (BoolBinary
                          op_id: BoolBinary_EqualTilde
                          left: {(${ VSub_Name KUBE_VERSION)}
                          right: {(${ VSub_Name KUBE_RELEASE_VERSION_REGEX)}
                        )
                    )
                  terminator: <Op_Semi ';'>
                )
              ]
              action: [
                (C {(curl)} {(--fail)} {(-o)} {(DQ (kubernetes-) (${ VSub_Name KUBE_VERSION) (.tar.gz))} 
                  {
                    (DQ (${ VSub_Name KUBE_RELEASE_BUCKET_URL) (/release/) (${ VSub_Name KUBE_VERSION) 
                      (/) (${ VSub_Name KUBE_TAR_NAME)
                    )
                  }
                )
              ]
              spids: [16777215 406]
            )
            (if_arm
              cond: [
                (Sentence
                  child: 
                    (DBracket
                      expr: 
                        (BoolBinary
                          op_id: BoolBinary_EqualTilde
                          left: {(${ VSub_Name KUBE_VERSION)}
                          right: {(${ VSub_Name KUBE_CI_VERSION_REGEX)}
                        )
                    )
                  terminator: <Op_Semi ';'>
                )
              ]
              action: [
                (C {(curl)} {(--fail)} {(-o)} {(DQ (kubernetes-) (${ VSub_Name KUBE_VERSION) (.tar.gz))} 
                  {
                    (DQ (${ VSub_Name KUBE_DEV_RELEASE_BUCKET_URL) (/ci/) (${ VSub_Name KUBE_VERSION) 
                      (/) (${ VSub_Name KUBE_TAR_NAME)
                    )
                  }
                )
              ]
              spids: [438 455]
            )
          ]
          else_action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ("Version doesn't match regexp"))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[496])]
            )
            (C {(exit)} {(1)})
          ]
          spids: [487 505]
        )
      ]
      spids: [369 507]
    )
  ]
)