(CommandList
  children: [
    (C {(set)} {(-eu)})
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:ScriptDir)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (C {(dirname)} 
                        {
                          (DQ 
                            (CommandSubPart
                              command_list: 
                                (CommandList
                                  children: [
                                    (Pipeline
                                      children: [
                                        (C {(echo)} {($ VSub_Number '$0')})
                                        (C {(sed)} {(-e)} 
                                          {
                                            (DQ ('s,^') (Lit_Other '\\') ('([^/]') (Lit_Other '\\') 
                                              ('),') 
                                              (CommandSubPart
                                                command_list: (CommandList children:[(C {(pwd)})])
                                                left_token: <Left_CommandSub '$('>
                                                spids: [50 52]
                                              ) (/) (Lit_Other '\\') ('1,')
                                            )
                                          }
                                        )
                                      ]
                                      negated: F
                                    )
                                  ]
                                )
                              left_token: <Left_CommandSub '$('>
                              spids: [33 57]
                            )
                          )
                        }
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [29 59]
              )
            }
          spids: [28]
        )
      ]
      spids: [26]
    )
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:ProtoRootDir)
          op: Equal
          rhs: {(DQ (${ VSub_Name ScriptDir) (/..))}
          spids: [63]
        )
      ]
      spids: [61]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:CHECK_ONLY) op:Equal rhs:{(0)} spids:[75])]
      spids: [75]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (DBracket
                  expr: 
                    (LogicalAnd
                      left: (BoolBinary op_id:BoolBinary_ge left:{($ VSub_Pound '$#')} right:{(1)})
                      right: 
                        (BoolBinary
                          op_id: BoolBinary_GlobDEqual
                          left: {(DQ ($ VSub_Number '$1'))}
                          right: {(DQ (--check-only))}
                        )
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:CHECK_ONLY) op:Equal rhs:{(1)} spids:[111])]
              spids: [111]
            )
            (C {(shift)})
          ]
          spids: [16777215 108]
        )
      ]
      spids: [16777215 117]
    )
    (SimpleCommand
      words: [{(pushd)} {(DQ (${ VSub_Name ProtoRootDir))}]
      redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(test)} {(KW_Bang '!')} {(-e)} {(src/google/protobuf/stubs/common.h)})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})
                (HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(__EOF__)}
                  here_end_span_id: 159
                  stdin_parts: [
                    (
'Could not find source code.  Make sure you are running this script from the\n'
                    )
                    ('root of the distribution tree.\n')
                  ]
                )
              ]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 144]
        )
      ]
      spids: [16777215 165]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(test)} {(KW_Bang '!')} {(-e)} {(src/Makefile)})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})
                (HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(__EOF__)}
                  here_end_span_id: 194
                  stdin_parts: [
                    ('Could not find src/Makefile.  You must run ./configure (and perhaps\n')
                    ('./autogen.sh) first.\n')
                  ]
                )
              ]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 179]
        )
      ]
      spids: [16777215 200]
    )
    (C {(cd)} {(src)})
    (C {(make)} {($ VSub_At '$@')} {(protoc)})
    (Assignment
      keyword: Assign_Declare
      flags: [-a]
      pairs: [
        (assign_pair
          lhs: (LhsName name:RUNTIME_PROTO_FILES)
          op: Equal
          rhs: 
            {
              (ArrayLiteralPart
                words: [
                  {(google/protobuf/any.proto)}
                  {(google/protobuf/api.proto)}
                  {(google/protobuf/duration.proto)}
                  {(google/protobuf/empty.proto)}
                  {(google/protobuf/field_mask.proto)}
                  {(google/protobuf/source_context.proto)}
                  {(google/protobuf/struct.proto)}
                  {(google/protobuf/timestamp.proto)}
                  {(google/protobuf/type.proto)}
                  {(google/protobuf/wrappers.proto)}
                ]
              )
            }
          spids: [221]
        )
      ]
      spids: [217]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:TMP_DIR)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: (CommandList children:[(C {(mktemp)} {(-d)})])
                left_token: <Left_CommandSub '$('>
                spids: [270 274]
              )
            }
          spids: [269]
        )
      ]
      spids: [269]
    )
    (C {(trap)} {(DQ ('rm -rf ') (${ VSub_Name TMP_DIR))} {(EXIT)})
    (C {(./protoc)} {(--objc_out) (Lit_Other '=') (DQ (${ VSub_Name TMP_DIR))} 
      {
        (BracedVarSub
          token: <VSub_Name RUNTIME_PROTO_FILES>
          bracket_op: (WholeArray op_id:Lit_At)
          spids: [297 302]
        )
      }
    )
    (C {(set)} {(Lit_Other '+') (e)})
    (SimpleCommand
      words: [
        {(diff)}
        {(-r)}
        {(DQ (${ VSub_Name TMP_DIR) (/google))}
        {(DQ (${ VSub_Name ProtoRootDir) (/objectivec/google))}
      ]
      redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (DBracket
                  expr: (BoolBinary op_id:BoolBinary_eq left:{($ VSub_QMark '$?')} right:{(0)})
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('Generated source for WellKnownTypes is current.'))})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
          ]
          spids: [16777215 345]
        )
      ]
      spids: [16777215 359]
    )
    (C {(set)} {(-e)})
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (DBracket
                  expr: 
                    (BoolBinary
                      op_id: BoolBinary_GlobDEqual
                      left: {(DQ (${ VSub_Name CHECK_ONLY))}
                      right: {(1)}
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('ERROR: The WKTs need to be regenerated! Run ') ($ VSub_Number '$0'))})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 387]
        )
      ]
      spids: [16777215 402]
    )
    (C {(echo)} {(DQ ('Copying over updated WellKnownType sources.'))})
    (C {(cp)} {(-r)} {(DQ (${ VSub_Name TMP_DIR) (/google/.))} 
      {(DQ (${ VSub_Name ProtoRootDir) (/objectivec/google/))}
    )
  ]
)