(CommandList children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-ne)} {(2)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("Usage: ") ($ VSub_Number "$0") (" <TARGET> <VERSION_NUMBER>\n") ("\n") ("TARGET: protoc | protoc-gen-javalite\n") ("\n") ("Example:\n") (" ") (Lit_Other "$") (" ") ($ VSub_Number "$0") (" protoc 3.0.0\n") (" ") (Lit_Other "$") (" ") ($ 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_expansion: True here_end: EOF was_filled: True spids: [22] ) ] ) (C {(exit)} {(1)}) ] spids: [-1 17] ) ] spids: [-1 57] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:TARGET) op:Equal rhs:{($ VSub_Number "$1")} spids:[60])] spids: [60] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:VERSION_NUMBER) op: Equal rhs: {($ VSub_Number "$2")} spids: [63] ) ] spids: [63] ) (Assignment keyword: Assign_Declare flags: ["'-a'"] pairs: [ (assign_pair lhs: (LhsName name:FILE_NAMES) op: Equal rhs: { (ArrayLiteralPart 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)} ] ) } spids: [74] ) ] spids: [70] ) (Assignment keyword: Assign_Declare flags: ["'-a'"] pairs: [ (assign_pair lhs: (LhsName name:WELL_KNOWN_TYPES) op: Equal rhs: { (ArrayLiteralPart 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)} ] ) } spids: [118] ) ] spids: [114] ) (C {(set)} {(-e)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DIR) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(mktemp)} {(-d)})]) left_token: <Left_CommandSub "$("> spids: [182 186] ) } spids: [181] ) ] spids: [181] ) (C {(mkdir)} {(-p)} {(${ VSub_Name DIR) (/include/google/protobuf/compiler)}) (ForEach iter_name: PROTO iter_words: [ { (BracedVarSub token: <VSub_Name WELL_KNOWN_TYPES> bracket_op: (WholeArray op_id:Lit_At) spids: [207 212] ) } ] do_arg_iter: False body: (DoGroup children: [ (C {(cp)} {(-f)} {(../src/) (${ VSub_Name PROTO)} {(${ VSub_Name DIR) (/include/) (${ VSub_Name PROTO)} ) ] spids: [215 235] ) spids: [206 213] ) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("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") ) } do_expansion: True here_end: EOF was_filled: True spids: [243] ) (Redir op_id: Redir_Great fd: -1 arg_word: {(${ VSub_Name DIR) (/readme.txt)} spids: [246] ) ] ) (C {(mkdir)} {(-p)} {(dist)}) (C {(mkdir)} {(-p)} {(${ VSub_Name DIR) (/bin)}) (ForExpr init: (BinaryAssign op_id:Arith_Equal left:(LhsName name:i) right:(ArithWord w:{(Lit_Digits 0)})) cond: (ArithBinary op_id: Arith_Less left: (ArithVarRef name:i) right: (ArithWord w: { (BracedVarSub token: <VSub_Name FILE_NAMES> prefix_op: VSub_Pound bracket_op: (WholeArray op_id:Lit_At) spids: [291 297] ) } ) ) update: (BinaryAssign op_id: Arith_PlusEqual left: (LhsName name:i) right: (ArithWord w:{(Lit_Digits 2)}) ) body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ZIP_NAME) op: Equal rhs: { (BracedVarSub token: <VSub_Name FILE_NAMES> bracket_op: (ArrayIndex expr:(ArithWord w:{($ VSub_Name "$i")})) spids: [309 314] ) } spids: [308] ) ] spids: [308] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} { (BracedVarSub token: <VSub_Name ZIP_NAME> suffix_op: (Slice begin: (ArithWord w:{(Lit_Digits 0)}) length: (ArithWord w:{(Lit_Digits 3)}) ) spids: [321 327] ) } {(Lit_Other "=")} {(DQ (win))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BINARY) op: Equal rhs: {(DQ ($ VSub_Name "$TARGET") (.exe))} spids: [341] ) ] spids: [341] ) ] spids: [-1 338] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BINARY) op: Equal rhs: {(DQ ($ VSub_Name "$TARGET"))} spids: [351] ) ] spids: [351] ) ] spids: [348 357] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BINARY_NAME) op: Equal rhs: { (BracedVarSub token: <VSub_Name FILE_NAMES> bracket_op: (ArrayIndex expr: (ArithWord w: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{($ VSub_Name "$i")}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [364 369] ) } ) ) spids: [361 371] ) } spids: [360] ) ] spids: [360] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BINARY_URL) op: Equal rhs: {(http) (Lit_Other ":") (//repo1.maven.org/maven2/com/google/protobuf/) ($ VSub_Name "$TARGET") (/) (${ VSub_Name VERSION_NUMBER) (/) ($ VSub_Name "$TARGET") (-) (${ VSub_Name VERSION_NUMBER) (-) (${ VSub_Name BINARY_NAME) } spids: [374] ) ] spids: [374] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(wget)} {(${ VSub_Name BINARY_URL)} {(-O)} {(${ VSub_Name DIR) (/bin/) ($ VSub_Name "$BINARY")} ) ] negated: True ) terminator: <Op_Amp "&"> ) (Sentence child: (SimpleCommand redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/dev/null)} spids: [414] ) ] ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ("[ERROR] Failed to download ") (${ VSub_Name BINARY_URL))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[431])] ) (SimpleCommand words: [ {(echo)} { (DQ ("[ERROR] Skipped ") ($ VSub_Name "$TARGET") (-) (${ VSub_Name VERSION_NAME) (-) (${ VSub_Name ZIP_NAME) ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[450])] ) (ControlFlow token:<ControlFlow_Continue continue>) ] spids: [-1 419] ) ] spids: [-1 457] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TARGET_ZIP_FILE) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_Backtick "`"> spids: [461 463] ) (/dist/) ($ VSub_Name "$TARGET") (-) (${ VSub_Name VERSION_NUMBER) (-) (${ VSub_Name ZIP_NAME) } spids: [460] ) ] spids: [460] ) (Sentence child:(C {(pushd)} {($ VSub_Name "$DIR")}) terminator:<Op_Amp "&">) (SimpleCommand redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[481])] ) (C {(chmod)} {(Lit_Other "+") (x)} {(bin/) ($ VSub_Name "$BINARY")}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$TARGET"))} {(Lit_Other "=")} {(DQ (protoc))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (Sentence child: (C {(zip)} {(-r)} {(${ VSub_Name TARGET_ZIP_FILE)} {(include)} {(bin)} {(readme.txt)} ) terminator: <Op_Amp "&"> ) (SimpleCommand redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[530])] ) ] spids: [-1 512] ) ] else_action: [ (Sentence child: (C {(zip)} {(-r)} {(${ VSub_Name TARGET_ZIP_FILE)} {(bin)}) terminator: <Op_Amp "&"> ) (SimpleCommand redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[549])] ) ] spids: [535 554] ) (C {(rm)} {(bin/) ($ VSub_Name "$BINARY")}) (Sentence child:(C {(popd)}) terminator:<Op_Amp "&">) (SimpleCommand redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[566])] ) (C {(echo)} {(DQ ("[INFO] Successfully created ") (${ VSub_Name TARGET_ZIP_FILE))}) ] spids: [305 580] ) ) ] )