(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) (/hack/lib/init.sh))})
    (C {(kube) (Lit_Other ':') (Lit_Other ':') (golang) (Lit_Other ':') (Lit_Other ':') (setup_env)})
    (C {(make)} {(-C)} {(DQ (${ VSub_Name KUBE_ROOT))} {(Lit_VarLike 'WHAT=') (cmd/linkcheck)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:linkcheck)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (C 
                        {(kube) (Lit_Other ':') (Lit_Other ':') (util) (Lit_Other ':') (Lit_Other ':') 
                          (find-binary)
                        } {(DQ (linkcheck))}
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [109 121]
              )
            }
          spids: [108]
        )
      ]
      spids: [108]
    )
    (C 
      {(kube) (Lit_Other ':') (Lit_Other ':') (util) (Lit_Other ':') (Lit_Other ':') (ensure-temp-dir)}
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:OUTPUT)
          op: Equal
          rhs: {(DQ (${ VSub_Name KUBE_TEMP)) (/linkcheck-output)}
          spids: [132]
        )
      ]
      spids: [132]
    )
    (FuncDef
      name: cleanup
      body: (BraceGroup children:[(C {(rm)} {(-rf)} {(DQ (${ VSub_Name OUTPUT))})] spids:[144])
      spids: [140 143]
    )
    (C {(trap)} {(DQ (cleanup))} {(EXIT)} {(SIGINT)})
    (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name '$OUTPUT'))})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:APIROOT)
          op: Equal
          rhs: {(DQ (${ VSub_Name KUBE_ROOT) (/pkg/api/))}
          spids: [178]
        )
      ]
      spids: [178]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:APISROOT)
          op: Equal
          rhs: {(DQ (${ VSub_Name KUBE_ROOT) (/pkg/apis/))}
          spids: [186]
        )
      ]
      spids: [186]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:DOCROOT)
          op: Equal
          rhs: {(DQ (${ VSub_Name KUBE_ROOT) (/docs/))}
          spids: [194]
        )
      ]
      spids: [194]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:ROOTS)
          op: Equal
          rhs: 
            {
              (ArrayLiteralPart
                words: [
                  {($ VSub_Name '$APIROOT')}
                  {($ VSub_Name '$APISROOT')}
                  {($ VSub_Name '$DOCROOT')}
                ]
              )
            }
          spids: [202]
        )
      ]
      spids: [202]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:found_invalid) op:Equal rhs:{(false)} spids:[211])]
      spids: [211]
    )
    (ForEach
      iter_name: root
      iter_words: [
        {
          (DQ 
            (BracedVarSub
              token: <VSub_Name ROOTS>
              bracket_op: (WholeArray op_id:Lit_At)
              spids: [221 226]
            )
          )
        }
      ]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (AndOr
              children: [
                (SimpleCommand
                  words: [{(DQ (${ VSub_Name linkcheck))} {(DQ ('--root-dir=') (${ VSub_Name root))}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 2
                      arg_word: 
                        {
                          (CommandSubPart
                            command_list: 
                              (CommandList
                                children: [
                                  (SimpleCommand
                                    words: [{(tee)} {(-a)} {(DQ (${ VSub_Name OUTPUT) (/error))}]
                                    redirects: [
                                      (Redir
                                        op_id: Redir_GreatAnd
                                        fd: 16777215
                                        arg_word: {(2)}
                                        spids: [260]
                                      )
                                    ]
                                  )
                                ]
                              )
                            left_token: <Left_ProcSubOut '>('>
                            spids: [248 262]
                          )
                        }
                      spids: [246]
                    )
                  ]
                )
                (AndOr
                  children: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [(assign_pair lhs:(LhsName name:ret) op:Equal rhs:{(0)} spids:[266])]
                      spids: [266]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:ret)
                          op: Equal
                          rhs: {($ VSub_QMark '$?')}
                          spids: [271]
                        )
                      ]
                      spids: [271]
                    )
                  ]
                  op_id: Op_DPipe
                )
              ]
              op_id: Op_DAmp
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_eq
                              left: {($ VSub_Name '$ret')}
                              right: {(1)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ('Failed: found invalid links in ') (${ VSub_Name root) (.))})
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:found_invalid)
                          op: Equal
                          rhs: {(true)}
                          spids: [302]
                        )
                      ]
                      spids: [302]
                    )
                  ]
                  spids: [16777215 288]
                )
              ]
              spids: [16777215 306]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_gt
                              left: {($ VSub_Name '$ret')}
                              right: {(1)}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [(C {(echo)} {(DQ ('Error running linkcheck'))}) (C {(exit)} {(1)})]
                  spids: [16777215 322]
                )
              ]
              spids: [16777215 337]
            )
          ]
          spids: [230 339]
        )
      spids: [219 228]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(${ VSub_Name found_invalid)} {(Lit_Other '=')} {(true)} 
                  {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('Summary of invalid links:'))})
            (C {(cat)} {(${ VSub_Name OUTPUT) (/error)})
            (C {(exit)} {(1)})
          ]
          spids: [16777215 357]
        )
      ]
      spids: [16777215 379]
    )
  ]
)