(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: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (AndOr
                          children: [
                            (C {(cd)} 
                              {
                                (DQ 
                                  (CommandSubPart
                                    command_list: 
                                      (CommandList
                                        children: [(C {(dirname)} {(DQ (${ VSub_Name BASH_SOURCE))})]
                                      )
                                    left_token: <Left_CommandSub '$('>
                                    spids: [78 86]
                                  ) (/../..)
                                )
                              }
                            )
                            (C {(pwd)} {(-P)})
                          ]
                          op_id: Op_DAmp
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [74 95]
                )
              )
            }
          spids: [72]
        )
      ]
      spids: [72]
    )
    (FuncDef
      name: 'kube::swagger::gen_types_swagger_doc'
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:group_version)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [126]
                )
              ]
              spids: [124]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:gv_dir)
                  op: Equal
                  rhs: {($ VSub_Number '$2')}
                  spids: [132]
                )
              ]
              spids: [130]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:TMPFILE)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (BracedVarSub
                          token: <VSub_Name TMPDIR>
                          suffix_op: 
                            (StringUnary
                              op_id: VTest_ColonHyphen
                              arg_word: {(Lit_Slash /) (tmp)}
                            )
                          spids: [140 145]
                        ) (/types_swagger_doc_generated.) 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [(C {(date)} {(Lit_Other '+') (Lit_Other '%') (s)})]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [147 153]
                        ) (.go)
                      )
                    }
                  spids: [138]
                )
              ]
              spids: [136]
            )
            (C {(echo)} 
              {
                (DQ ('Generating swagger type docs for ') (${ VSub_Name group_version) (' at ') 
                  (${ VSub_Name gv_dir)
                )
              }
            )
            (SimpleCommand
              words: [{(sed)} {(SQ <s/YEAR/2016/>)} {(hack/boilerplate/boilerplate.go.txt)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_Name '$TMPFILE'))}
                  spids: [182]
                )
              ]
            )
            (SimpleCommand
              words: [
                {(echo)}
                {
                  (DQ ('package ') 
                    (BracedVarSub
                      token: <VSub_Name group_version>
                      suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{('*') (Lit_Slash /)})
                      spids: [193 198]
                    )
                  )
                }
              ]
              redirects: [
                (Redir
                  op_id: Redir_DGreat
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_Name '$TMPFILE'))}
                  spids: [201]
                )
              ]
            )
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir
                  op_id: Redir_DGreat
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_Name '$TMPFILE'))}
                  spids: [210]
                )
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: 
                    {
                      (DQ ('\n') 
                        (
'// This file contains a collection of methods that can be used from go-restful to\n'
                        ) ('// generate Swagger API documentation for its models. Please read this PR for more\n') 
                        (
'// information on the implementation: https://github.com/emicklei/go-restful/pull/215\n'
                        ) ('//\n') 
                        (
'// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if\n'
                        ) ('// they are on one line! For multiple line or blocks that you want to ignore use ---.\n') 
                        ('// Any context after a --- is ignored.\n') ('//\n') ('// Those methods can be generated by using hack/update-generated-swagger-docs.sh\n') ('\n') 
                        ('// AUTO-GENERATED FUNCTIONS START HERE\n')
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [216]
                )
              ]
            )
            (SimpleCommand
              words: [
                {(go)}
                {(run)}
                {(cmd/genswaggertypedocs/swagger_type_docs.go)}
                {(-s)}
                {(DQ (${ VSub_Name gv_dir) (/types.go))}
                {(-f)}
                {(-)}
              ]
              redirects: [
                (Redir
                  op_id: Redir_DGreat
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_Name '$TMPFILE'))}
                  spids: [259]
                )
              ]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ('// AUTO-GENERATED FUNCTIONS END HERE'))}]
              redirects: [
                (Redir
                  op_id: Redir_DGreat
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_Name '$TMPFILE'))}
                  spids: [273]
                )
              ]
            )
            (C {(gofmt)} {(-w)} {(-s)} {(DQ ($ VSub_Name '$TMPFILE'))})
            (C {(mv)} {(DQ ($ VSub_Name '$TMPFILE'))} 
              {(DQ ) (${ VSub_Name gv_dir) (DQ (/types_swagger_doc_generated.go))}
            )
          ]
          spids: [121]
        )
      spids: [111 120]
    )
    (FuncDef
      name: 'kube::swagger::gen_api_ref_docs'
      body: 
        (BraceGroup
          children: [
            (C {(Lit_Other ':')} 
              {
                (DQ 
                  (BracedVarSub
                    token: <VSub_Name GROUP_VERSIONS>
                    suffix_op: 
                      (StringUnary
                        op_id: VTest_QMark
                        arg_word: {('Must set GROUP_VERSIONS env var')}
                      )
                    spids: [350 354]
                  )
                )
              }
            )
            (C {(Lit_Other ':')} 
              {
                (DQ 
                  (BracedVarSub
                    token: <VSub_Name GV_DIRS>
                    suffix_op: (StringUnary op_id:VTest_QMark arg_word:{('Must set GV_DIRS env var')})
                    spids: [361 365]
                  )
                )
              }
            )
            (C {(echo)} 
              {
                (DQ ('Generating API reference docs for group versions: ') 
                  (BracedVarSub
                    token: <VSub_Name GROUP_VERSIONS>
                    bracket_op: (WholeArray op_id:Lit_At)
                    spids: [374 379]
                  ) (', at dirs: ') 
                  (BracedVarSub
                    token: <VSub_Name GV_DIRS>
                    bracket_op: (WholeArray op_id:Lit_At)
                    spids: [381 386]
                  )
                )
              }
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:GROUP_VERSIONS)
                  op: Equal
                  rhs: 
                    {
                      (ArrayLiteralPart
                        words: [
                          {
                            (BracedVarSub
                              token: <VSub_Name GROUP_VERSIONS>
                              bracket_op: (WholeArray op_id:Lit_At)
                              spids: [392 397]
                            )
                          }
                        ]
                      )
                    }
                  spids: [390]
                )
              ]
              spids: [390]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:GV_DIRS)
                  op: Equal
                  rhs: 
                    {
                      (ArrayLiteralPart
                        words: [
                          {
                            (BracedVarSub
                              token: <VSub_Name GV_DIRS>
                              bracket_op: (WholeArray op_id:Lit_At)
                              spids: [403 408]
                            )
                          }
                        ]
                      )
                    }
                  spids: [401]
                )
              ]
              spids: [401]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:swagger_spec_path)
                  op: Equal
                  rhs: {(${ VSub_Number 1)}
                  spids: [414]
                )
              ]
              spids: [412]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:output_dir)
                  op: Equal
                  rhs: {(${ VSub_Number 2)}
                  spids: [422]
                )
              ]
              spids: [420]
            )
            (C {(echo)} {(DQ ('Reading swagger spec from: ') (${ VSub_Name swagger_spec_path))})
            (C {(echo)} {(DQ ('Generating the docs at: ') (${ VSub_Name output_dir))})
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:repo_dir)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name REPO_DIR>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_ColonHyphen
                            arg_word: {(DQ (${ VSub_Name KUBE_ROOT))}
                          )
                        spids: [476 484]
                      )
                    }
                  spids: [475]
                )
              ]
              spids: [473]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:tmp_subpath)
                  op: Equal
                  rhs: {(DQ (_output/generated_html))}
                  spids: [489]
                )
              ]
              spids: [487]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:output_tmp_in_host)
                  op: Equal
                  rhs: {(DQ (${ VSub_Name repo_dir) (/) (${ VSub_Name tmp_subpath))}
                  spids: [497]
                )
              ]
              spids: [495]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:output_tmp)
                  op: Equal
                  rhs: {(DQ (${ VSub_Name KUBE_ROOT) (/) (${ VSub_Name tmp_subpath))}
                  spids: [511]
                )
              ]
              spids: [509]
            )
            (C {(echo)} {(DQ ('Generating api reference docs at ') (${ VSub_Name output_tmp))})
            (ForEach
              iter_name: ver
              iter_words: [
                {
                  (DQ 
                    (BracedVarSub
                      token: <VSub_Name GROUP_VERSIONS>
                      bracket_op: (WholeArray op_id:Lit_At)
                      spids: [542 547]
                    )
                  )
                }
              ]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (C {(mkdir)} {(-p)} {(DQ (${ VSub_Name output_tmp) (/) (${ VSub_Name ver))})
                  ]
                  spids: [551 569]
                )
              spids: [540 549]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:user_flags)
                  op: Equal
                  rhs: 
                    {
                      (DQ ('-u ') 
                        (CommandSubPart
                          command_list: (CommandList children:[(C {(id)} {(-u)})])
                          left_token: <Left_CommandSub '$('>
                          spids: [576 580]
                        )
                      )
                    }
                  spids: [573]
                )
              ]
              spids: [573]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: 
                                {
                                  (CommandSubPart
                                    command_list: (CommandList children:[(C {(uname)})])
                                    left_token: <Left_CommandSub '$('>
                                    spids: [588 590]
                                  )
                                }
                              right: {(DQ (Darwin))}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:user_flags)
                          op: Equal
                          rhs: {(DQ )}
                          spids: [608]
                        )
                      ]
                      spids: [608]
                    )
                  ]
                  spids: [16777215 601]
                )
              ]
              spids: [16777215 613]
            )
            (ForEach
              iter_name: i
              iter_words: [
                {
                  (DQ 
                    (BracedVarSub
                      token: <VSub_Name GROUP_VERSIONS>
                      prefix_op: VSub_Bang
                      bracket_op: (WholeArray op_id:Lit_At)
                      spids: [624 630]
                    )
                  )
                }
              ]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:ver)
                          op: Equal
                          rhs: 
                            {
                              (BracedVarSub
                                token: <VSub_Name GROUP_VERSIONS>
                                bracket_op: (ArrayIndex expr:(ArithVarRef name:i))
                                spids: [640 645]
                              )
                            }
                          spids: [639]
                        )
                      ]
                      spids: [637]
                    )
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:dir)
                          op: Equal
                          rhs: 
                            {
                              (BracedVarSub
                                token: <VSub_Name GV_DIRS>
                                bracket_op: (ArrayIndex expr:(ArithVarRef name:i))
                                spids: [651 656]
                              )
                            }
                          spids: [650]
                        )
                      ]
                      spids: [648]
                    )
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:tmp_in_host)
                          op: Equal
                          rhs: {(DQ (${ VSub_Name output_tmp_in_host) (/) (${ VSub_Name ver))}
                          spids: [661]
                        )
                      ]
                      spids: [659]
                    )
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:register_file)
                          op: Equal
                          rhs: {(DQ (${ VSub_Name dir) (/register.go))}
                          spids: [675]
                        )
                      ]
                      spids: [673]
                    )
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:swagger_json_name)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (CommandSubPart
                                  command_list: 
                                    (CommandList
                                      children: [
                                        (C 
                                          {(kube) (Lit_Other ':') (Lit_Other ':') (util) 
                                            (Lit_Other ':') (Lit_Other ':') (gv-to-swagger-name)
                                          } {(DQ (${ VSub_Name ver))}
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                  spids: [688 702]
                                )
                              )
                            }
                          spids: [686]
                        )
                      ]
                      spids: [684]
                    )
                    (C {(docker)} {(run)} {(${ VSub_Name user_flags)} {(--rm)} {(-v)} 
                      {(DQ (${ VSub_Name tmp_in_host)) (Lit_Other ':') (/output) (Lit_Other ':') (z)} {(-v)} {(DQ (${ VSub_Name swagger_spec_path)) (Lit_Other ':') (/swagger-source) (Lit_Other ':') (z)} 
                      {(-v)} {(DQ (${ VSub_Name register_file)) (Lit_Other ':') (/register.go) (Lit_Other ':') (z)} 
                      {(--net) (Lit_Other '=') (host)} {(-e)} 
                      {
                        (DQ ('https_proxy=') 
                          (BracedVarSub
                            token: <VSub_Name KUBERNETES_HTTPS_PROXY>
                            suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )})
                            spids: [769 772]
                          )
                        )
                      } {(gcr.io/google_containers/gen-swagger-docs) (Lit_Other ':') (v8)} 
                      {(DQ (${ VSub_Name swagger_json_name))}
                    )
                  ]
                  spids: [634 790]
                )
              spids: [622 632]
            )
            (SimpleCommand
              words: [{(pushd)} {(DQ (${ VSub_Name output_tmp))}]
              redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[806])]
            )
            (C {(touch)} {(.generated_html)})
            (Pipeline
              children: [
                (C {(find)} {(.)} {(-type)} {(f)})
                (C {(cut)} {(-sd)} {(/)} {(-f)} {(2-)})
                (SimpleCommand
                  words: [{(sort)}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 16777215
                      arg_word: {(.generated_html)}
                      spids: [843]
                    )
                  ]
                  more_env: [(env_pair name:LC_ALL val:{(C)} spids:[838])]
                )
              ]
              negated: False
            )
            (SimpleCommand
              words: [{(popd)}]
              redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[850])]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (Pipeline
                          children: [
                            (SimpleCommand
                              words: [{(sed)} {(--help)}]
                              redirects: [
                                (Redir
                                  op_id: Redir_GreatAnd
                                  fd: 2
                                  arg_word: {(1)}
                                  spids: [865]
                                )
                              ]
                              more_env: [(env_pair name:LANG val:{(C)} spids:[858])]
                            )
                            (C {(grep)} {(-q)} {(GNU)})
                          ]
                          negated: False
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:SED)
                          op: Equal
                          rhs: {(DQ (sed))}
                          spids: [880]
                        )
                      ]
                      spids: [880]
                    )
                  ]
                  spids: [16777215 877]
                )
                (if_arm
                  cond: [
                    (Sentence
                      child: (C {(which)} {(gsed)})
                      terminator: <Op_Amp '&'>
                    )
                    (Sentence
                      child: 
                        (SimpleCommand
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 16777215
                              arg_word: {(/dev/null)}
                              spids: [893]
                            )
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:SED)
                          op: Equal
                          rhs: {(DQ (gsed))}
                          spids: [900]
                        )
                      ]
                      spids: [900]
                    )
                  ]
                  spids: [886 897]
                )
              ]
              else_action: [
                (SimpleCommand
                  words: [
                    {(echo)}
                    {
                      (DQ 
                        (
'Failed to find GNU sed as sed or gsed. If you are on Mac: brew install gnu-sed.'
                        )
                      )
                    }
                  ]
                  redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[915])]
                )
                (C {(exit)} {(1)})
              ]
              spids: [906 924]
            )
            (While
              cond: [(Sentence child:(C {(read)} {(file)}) terminator:<Op_Semi ';'>)]
              body: 
                (DoGroup
                  children: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (DBracket
                                  expr: 
                                    (LogicalAnd
                                      left: 
                                        (BoolUnary
                                          op_id: BoolUnary_e
                                          child: 
                                            {(DQ (${ VSub_Name output_dir) (/) (${ VSub_Name file))}
                                        )
                                      right: 
                                        (BoolUnary
                                          op_id: BoolUnary_e
                                          child: 
                                            {(DQ (${ VSub_Name output_tmp) (/) (${ VSub_Name file))}
                                        )
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(echo)} 
                              {
                                (DQ ('comparing ') (${ VSub_Name output_dir) (/) (${ VSub_Name file) 
                                  (' with ') (${ VSub_Name output_tmp) (/) (${ VSub_Name file)
                                )
                              }
                            )
                            (C {($ VSub_Name '$SED')} {(-i)} {(SQ <'s/^Last updated.*$//'>)} 
                              {(DQ (${ VSub_Name output_tmp) (/) (${ VSub_Name file))}
                            )
                            (If
                              arms: [
                                (if_arm
                                  cond: [
                                    (Sentence
                                      child: 
                                        (SimpleCommand
                                          words: [
                                            {(diff)}
                                            {(-NauprB)}
                                            {(DQ (${ VSub_Name output_dir) (/) (${ VSub_Name file))}
                                            {(DQ (${ VSub_Name output_tmp) (/) (${ VSub_Name file))}
                                          ]
                                          redirects: [
                                            (Redir
                                              op_id: Redir_Great
                                              fd: 16777215
                                              arg_word: {(/dev/null)}
                                              spids: [1055]
                                            )
                                          ]
                                        )
                                      terminator: <Op_Semi ';'>
                                    )
                                  ]
                                  action: [
                                    (C {(cp)} {(DQ (${ VSub_Name output_dir) (/) (${ VSub_Name file))} 
                                      {(DQ (${ VSub_Name output_tmp) (/) (${ VSub_Name file))}
                                    )
                                  ]
                                  spids: [16777215 1059]
                                )
                              ]
                              spids: [16777215 1089]
                            )
                          ]
                          spids: [16777215 971]
                        )
                      ]
                      spids: [16777215 1092]
                    )
                  ]
                  spids: [935 1095]
                )
              redirects: [
                (Redir
                  op_id: Redir_Less
                  fd: 16777215
                  arg_word: {(DQ (${ VSub_Name output_tmp) (/.generated_html))}
                  spids: [1097]
                )
              ]
            )
            (C {(echo)} 
              {
                (DQ ('Moving api reference docs from ') (${ VSub_Name output_tmp) (' to ') 
                  (${ VSub_Name output_dir)
                )
              }
            )
            (C {(mkdir)} {(-p)} {(DQ (${ VSub_Name output_dir))})
            (C {(cp)} {(-af)} {(DQ (${ VSub_Name output_tmp)) (/) (Lit_Other '*')} 
              {(DQ (${ VSub_Name output_dir))}
            )
            (C {(rm)} {(-r)} {(DQ (${ VSub_Name output_tmp))})
          ]
          spids: [344]
        )
      spids: [334 343]
    )
  ]
)