(command.CommandList children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-ne>} {<2>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 53 stdin_parts: [ <'Usage: '> ($ Id.VSub_Number '$0') <' <TARGET> <VERSION_NUMBER>\n'> <'\n'> <'TARGET: protoc | protoc-gen-javalite\n'> <'\n'> <'Example:\n'> <' '> <Id.Lit_Dollar '$'> <' '> ($ Id.VSub_Number '$0') <' protoc 3.0.0\n'> <' '> <Id.Lit_Dollar '$'> <' '> ($ Id.VSub_Number '$0') <' protoc-gen-javalite 3.0.0\n'> <'\n'> < 'This script will download pre-built protoc or protoc plugin binaries from maven\n' > < 'repository and create .zip packages suitable to be included in the github\n' > < 'release page. If the target is protoc, well-known type .proto files will also be\n' > <'included. Each invocation will create 5 zip packages:\n'> <' dist/<TARGET>-<VERSION_NUMBER>-win32.zip\n'> <' dist/<TARGET>-<VERSION_NUMBER>-osx-x86_32.zip\n'> <' dist/<TARGET>-<VERSION_NUMBER>-osx-x86_64.zip\n'> <' dist/<TARGET>-<VERSION_NUMBER>-linux-x86_32.zip\n'> <' dist/<TARGET>-<VERSION_NUMBER>-linux-x86_64.zip\n'> ] ) ) ] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [4 17] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGET) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [62] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:VERSION_NUMBER) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [65] ) ] ) (C {<declare>} {<-a>} {<Id.Lit_VarLike 'FILE_NAMES='> (sh_array_literal left: <Id.Op_LParen _> words: [ {<win32.zip>} {<windows-x86_32.exe>} {<osx-x86_32.zip>} {<osx-x86_32.exe>} {<osx-x86_64.zip>} {<osx-x86_64.exe>} {<linux-x86_32.zip>} {<linux-x86_32.exe>} {<linux-x86_64.zip>} {<linux-x86_64.exe>} ] ) } ) (C {<declare>} {<-a>} {<Id.Lit_VarLike 'WELL_KNOWN_TYPES='> (sh_array_literal left: <Id.Op_LParen _> words: [ {<'google/protobuf/descriptor.proto'>} {<'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'>} {<'google/protobuf/compiler/plugin.proto'>} ] ) } ) (C {<set>} {<-e>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DIR) op: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<mktemp>} {<-d>}))} spids: [183] ) ] ) (C {<mkdir>} {<-p>} {(${ Id.VSub_Name DIR) <'/include/google/protobuf/compiler'>}) (command.ForEach iter_names: [PROTO] iterable: (for_iter.Words words: [ { (braced_var_sub token: <Id.VSub_Name WELL_KNOWN_TYPES> bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ] ) body: (command.DoGroup children: [ (C {<cp>} {<-f>} {<'../src/'> (${ Id.VSub_Name PROTO)} {(${ Id.VSub_Name DIR) <'/include/'> (${ Id.VSub_Name PROTO)} ) ] ) ) (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 267 stdin_parts: [ <'Protocol Buffers - Google\'s data interchange format\n'> <'Copyright 2008 Google Inc.\n'> <'https://developers.google.com/protocol-buffers/\n'> <'\n'> <'This package contains a precompiled binary version of the protocol buffer\n'> <'compiler (protoc). This binary is intended for users who want to use Protocol\n'> <'Buffers in languages other than C++ but do not want to compile protoc\n'> <'themselves. To install, simply place this binary somewhere in your PATH.\n'> <'\n'> <'Please refer to our official github site for more installation instructions:\n'> <' https://github.com/google/protobuf\n'> ] ) ) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(${ Id.VSub_Name DIR) <'/readme.txt'>} ) ] do_fork: T ) (C {<mkdir>} {<-p>} {<dist>}) (C {<mkdir>} {<-p>} {(${ Id.VSub_Name DIR) <'/bin'>}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 0>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike i> right: { (braced_var_sub token: <Id.VSub_Name FILE_NAMES> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) update: (arith_expr.BinaryAssign op_id: Id.Arith_PlusEqual left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 2>} ) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ZIP_NAME) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name FILE_NAMES> bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName '$i')}) ) } spids: [312] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (braced_var_sub token: <Id.VSub_Name ZIP_NAME> suffix_op: (suffix_op.Slice begin: {<Id.Lit_Digits 0>} length: {<Id.Lit_Digits 3>} ) ) } {<Id.Lit_Equals '='>} {(DQ <win>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BINARY) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$TARGET') <.exe>)} spids: [345] ) ] ) ] spids: [321 342] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BINARY) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$TARGET'))} spids: [355] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BINARY_NAME) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name FILE_NAMES> bracket_op: (bracket_op.ArrayIndex expr: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: {($ Id.VSub_DollarName '$i')} right: {<Id.Lit_Digits 1>} ) ) } ) ) } spids: [364] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BINARY_URL) op: assign_op.Equal rhs: {<http> <Id.Lit_Colon ':'> <'//repo1.maven.org/maven2/com/google/protobuf/'> ($ Id.VSub_DollarName '$TARGET') <'/'> (${ Id.VSub_Name VERSION_NUMBER) <'/'> ($ Id.VSub_DollarName '$TARGET') <-> (${ Id.VSub_Name VERSION_NUMBER) <-> (${ Id.VSub_Name BINARY_NAME) } spids: [378] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [ {<wget>} {(${ Id.VSub_Name BINARY_URL)} {<-O>} {(${ Id.VSub_Name DIR) <'/bin/'> ($ Id.VSub_DollarName '$BINARY')} ] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] negated: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} {(DQ <'[ERROR] Failed to download '> (${ Id.VSub_Name BINARY_URL))} ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [ {<echo>} { (DQ <'[ERROR] Skipped '> ($ Id.VSub_DollarName '$TARGET') <-> (${ Id.VSub_Name VERSION_NAME) <-> (${ Id.VSub_Name ZIP_NAME) ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Continue continue>) ] spids: [399 422] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGET_ZIP_FILE) op: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<pwd>})) <'/dist/'> ($ Id.VSub_DollarName '$TARGET') <-> (${ Id.VSub_Name VERSION_NUMBER) <-> (${ Id.VSub_Name ZIP_NAME) } spids: [463] ) ] ) (command.Simple words: [{<pushd>} {($ Id.VSub_DollarName '$DIR')}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<chmod>} {<Id.Lit_Other '+'> <x>} {<'bin/'> ($ Id.VSub_DollarName '$BINARY')}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$TARGET'))} {<Id.Lit_Equals '='>} {(DQ <protoc>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<zip>} {<-r>} {(${ Id.VSub_Name TARGET_ZIP_FILE)} {<include>} {<bin>} {<readme.txt>} ] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] spids: [499 516] ) ] else_action: [ (command.Simple words: [{<zip>} {<-r>} {(${ Id.VSub_Name TARGET_ZIP_FILE)} {<bin>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] ) (C {<rm>} {<'bin/'> ($ Id.VSub_DollarName '$BINARY')}) (command.Simple words: [{<popd>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<echo>} {(DQ <'[INFO] Successfully created '> (${ Id.VSub_Name TARGET_ZIP_FILE))}) ] ) ) ] )