(command.CommandList
  children: [
    (C {<set>} {<-eu>})
    (C {<readonly>} 
      {<Id.Lit_VarLike 'ScriptDir='> 
        (command_sub
          left_token: <Id.Left_DollarParen '$('>
          child: 
            (C {<dirname>} 
              {
                (DQ 
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Pipeline
                        children: [
                          (C {<echo>} {($ Id.VSub_Number '$0')})
                          (C {<sed>} {<-e>} 
                            {
                              (DQ <'s,^'> <Id.Lit_BadBackslash '\\'> <'([^/]'> 
                                <Id.Lit_BadBackslash '\\'> <'),'> (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<pwd>})) <'/'> 
                                <Id.Lit_BadBackslash '\\'> <'1,'>
                              )
                            }
                          )
                        ]
                        negated: F
                      )
                  )
                )
              }
            )
        )
      }
    )
    (C {<readonly>} {<Id.Lit_VarLike 'ProtoRootDir='> (DQ (${ Id.VSub_Name ScriptDir) <'/..'>)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CHECK_ONLY)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [75]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.LogicalAnd
                          left: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_ge
                              left: {($ Id.VSub_Pound '$#')}
                              right: {<1>}
                            )
                          right: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_GlobDEqual
                              left: {(DQ ($ Id.VSub_Number '$1'))}
                              right: {(DQ <--check-only>)}
                            )
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:CHECK_ONLY)
                  op: assign_op.Equal
                  rhs: {<1>}
                  spids: [111]
                )
              ]
            )
            (C {<shift>})
          ]
          spids: [78 108]
        )
      ]
    )
    (command.Simple
      words: [{<pushd>} {(DQ (${ Id.VSub_Name ProtoRootDir))}]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
      do_fork: T
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<test>} {<Id.KW_Bang '!'>} {<-e>} {<'src/google/protobuf/stubs/common.h'>})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})
                (redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      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'>
                      ]
                    )
                )
              ]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [133 144]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: (C {<test>} {<Id.KW_Bang '!'>} {<-e>} {<'src/Makefile'>})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})
                (redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      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'>
                      ]
                    )
                )
              ]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [168 179]
        )
      ]
    )
    (C {<cd>} {<src>})
    (C {<make>} {($ Id.VSub_At '$@')} {<protoc>})
    (C {<declare>} {<-a>} 
      {<Id.Lit_VarLike 'RUNTIME_PROTO_FILES='> 
        (sh_array_literal
          left: <Id.Op_LParen _>
          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'>}
          ]
        )
      }
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:TMP_DIR)
          op: assign_op.Equal
          rhs: {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<mktemp>} {<-d>}))}
          spids: [269]
        )
      ]
    )
    (C {<trap>} {(DQ <'rm -rf '> (${ Id.VSub_Name TMP_DIR))} {<EXIT>})
    (C {<'./protoc'>} {<--objc_out> <Id.Lit_Equals '='> (DQ (${ Id.VSub_Name TMP_DIR))} 
      {
        (braced_var_sub
          token: <Id.VSub_Name RUNTIME_PROTO_FILES>
          bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
        )
      }
    )
    (C {<set>} {<Id.Lit_Other '+'> <e>})
    (command.Simple
      words: [
        {<diff>}
        {<-r>}
        {(DQ (${ Id.VSub_Name TMP_DIR) <'/google'>)}
        {(DQ (${ Id.VSub_Name ProtoRootDir) <'/objectivec/google'>)}
      ]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
      do_fork: T
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_eq
                          left: {($ Id.VSub_QMark '$?')}
                          right: {<0>}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'Generated source for WellKnownTypes is current.'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
          ]
          spids: [331 345]
        )
      ]
    )
    (C {<set>} {<-e>})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {(DQ (${ Id.VSub_Name CHECK_ONLY))}
                          right: {<1>}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'ERROR: The WKTs need to be regenerated! Run '> ($ Id.VSub_Number '$0'))})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [369 387]
        )
      ]
    )
    (C {<echo>} {(DQ <'Copying over updated WellKnownType sources.'>)})
    (C {<cp>} {<-r>} {(DQ (${ Id.VSub_Name TMP_DIR) <'/google/.'>)} 
      {(DQ (${ Id.VSub_Name ProtoRootDir) <'/objectivec/google/'>)}
    )
  ]
)