(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: { (DQ (CommandSubPart command_list: (CommandList children: [ (AndOr children: [ (C {(cd)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {(DQ (${ VSub_Name BASH_SOURCE))})] ) left_token: <Left_CommandSub "$("> spids: [78 86] ) (/../..) ) } ) (C {(pwd)} {(-P)}) ] op_id: Op_DAmp ) ] ) left_token: <Left_CommandSub "$("> spids: [74 95] ) ) } spids: [72] ) ] spids: [72] ) (FuncDef name: "kube::swagger::gen_types_swagger_doc" body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:group_version) op: Equal rhs: {($ VSub_Number "$1")} spids: [126] ) ] spids: [124] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:gv_dir) op: Equal rhs: {($ VSub_Number "$2")} spids: [132] ) ] spids: [130] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:TMPFILE) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name TMPDIR> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(Lit_Slash /) (tmp)} ) spids: [140 145] ) (/types_swagger_doc_generated.) (CommandSubPart command_list: (CommandList children: [(C {(date)} {(Lit_Other "+") (Lit_Other "%") (s)})] ) left_token: <Left_CommandSub "$("> spids: [147 153] ) (.go) ) } spids: [138] ) ] spids: [136] ) (C {(echo)} { (DQ ("Generating swagger type docs for ") (${ VSub_Name group_version) (" at ") (${ VSub_Name gv_dir) ) } ) (SimpleCommand words: [{(sed)} {(SQ <s/YEAR/2016/>)} {(hack/boilerplate/boilerplate.go.txt)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name "$TMPFILE"))} spids: [182] ) ] ) (SimpleCommand words: [ {(echo)} { (DQ ("package ") (BracedVarSub token: <VSub_Name group_version> suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{("*") (Lit_Slash /)}) spids: [193 198] ) ) } ] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(DQ ($ VSub_Name "$TMPFILE"))} spids: [201] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(DQ ($ VSub_Name "$TMPFILE"))} spids: [210] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("\n") ( "// This file contains a collection of methods that can be used from go-restful to\n" ) ("// generate Swagger API documentation for its models. Please read this PR for more\n") ( "// information on the implementation: https://github.com/emicklei/go-restful/pull/215\n" ) ("//\n") ( "// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if\n" ) ("// they are on one line! For multiple line or blocks that you want to ignore use ---.\n") ("// Any context after a --- is ignored.\n") ("//\n") ("// Those methods can be generated by using hack/update-generated-swagger-docs.sh\n") ("\n") ("// AUTO-GENERATED FUNCTIONS START HERE\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [216] ) ] ) (SimpleCommand words: [ {(go)} {(run)} {(cmd/genswaggertypedocs/swagger_type_docs.go)} {(-s)} {(DQ (${ VSub_Name gv_dir) (/types.go))} {(-f)} {(-)} ] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(DQ ($ VSub_Name "$TMPFILE"))} spids: [258] ) ] ) (SimpleCommand words: [{(echo)} {(DQ ("// AUTO-GENERATED FUNCTIONS END HERE"))}] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(DQ ($ VSub_Name "$TMPFILE"))} spids: [272] ) ] ) (C {(gofmt)} {(-w)} {(-s)} {(DQ ($ VSub_Name "$TMPFILE"))}) (C {(mv)} {(DQ ($ VSub_Name "$TMPFILE"))} {(DQ ) (${ VSub_Name gv_dir) (DQ (/types_swagger_doc_generated.go))} ) ] spids: [121] ) spids: [111 120] ) (FuncDef name: "kube::swagger::gen_api_ref_docs" body: (BraceGroup children: [ (C {(Lit_Other ":")} { (DQ (BracedVarSub token: <VSub_Name GROUP_VERSIONS> suffix_op: (StringUnary op_id: VTest_QMark arg_word: {("Must set GROUP_VERSIONS env var")} ) spids: [349 353] ) ) } ) (C {(Lit_Other ":")} { (DQ (BracedVarSub token: <VSub_Name GV_DIRS> suffix_op: (StringUnary op_id:VTest_QMark arg_word:{("Must set GV_DIRS env var")}) spids: [360 364] ) ) } ) (C {(echo)} { (DQ ("Generating API reference docs for group versions: ") (BracedVarSub token: <VSub_Name GROUP_VERSIONS> bracket_op: (WholeArray op_id:Lit_At) spids: [373 378] ) (", at dirs: ") (BracedVarSub token: <VSub_Name GV_DIRS> bracket_op: (WholeArray op_id:Lit_At) spids: [380 385] ) ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GROUP_VERSIONS) op: Equal rhs: { (ArrayLiteralPart words: [ { (BracedVarSub token: <VSub_Name GROUP_VERSIONS> bracket_op: (WholeArray op_id:Lit_At) spids: [391 396] ) } ] ) } spids: [389] ) ] spids: [389] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:GV_DIRS) op: Equal rhs: { (ArrayLiteralPart words: [ { (BracedVarSub token: <VSub_Name GV_DIRS> bracket_op: (WholeArray op_id:Lit_At) spids: [402 407] ) } ] ) } spids: [400] ) ] spids: [400] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:swagger_spec_path) op: Equal rhs: {(${ VSub_Number 1)} spids: [413] ) ] spids: [411] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:output_dir) op: Equal rhs: {(${ VSub_Number 2)} spids: [421] ) ] spids: [419] ) (C {(echo)} {(DQ ("Reading swagger spec from: ") (${ VSub_Name swagger_spec_path))}) (C {(echo)} {(DQ ("Generating the docs at: ") (${ VSub_Name output_dir))}) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:repo_dir) op: Equal rhs: { (BracedVarSub token: <VSub_Name REPO_DIR> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(DQ (${ VSub_Name KUBE_ROOT))} ) spids: [475 483] ) } spids: [474] ) ] spids: [472] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:tmp_subpath) op: Equal rhs: {(DQ (_output/generated_html))} spids: [488] ) ] spids: [486] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:output_tmp_in_host) op: Equal rhs: {(DQ (${ VSub_Name repo_dir) (/) (${ VSub_Name tmp_subpath))} spids: [496] ) ] spids: [494] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:output_tmp) op: Equal rhs: {(DQ (${ VSub_Name KUBE_ROOT) (/) (${ VSub_Name tmp_subpath))} spids: [510] ) ] spids: [508] ) (C {(echo)} {(DQ ("Generating api reference docs at ") (${ VSub_Name output_tmp))}) (ForEach iter_name: ver iter_words: [ { (DQ (BracedVarSub token: <VSub_Name GROUP_VERSIONS> bracket_op: (WholeArray op_id:Lit_At) spids: [541 546] ) ) } ] do_arg_iter: False body: (DoGroup children: [ (C {(mkdir)} {(-p)} {(DQ (${ VSub_Name output_tmp) (/) (${ VSub_Name ver))}) ] spids: [550 568] ) spids: [539 548] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:user_flags) op: Equal rhs: { (DQ ("-u ") (CommandSubPart command_list: (CommandList children:[(C {(id)} {(-u)})]) left_token: <Left_CommandSub "$("> spids: [575 579] ) ) } spids: [572] ) ] spids: [572] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: { (CommandSubPart command_list: (CommandList children:[(C {(uname)})]) left_token: <Left_CommandSub "$("> spids: [587 589] ) } right: {(DQ (Darwin))} ) ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:user_flags) op: Equal rhs: {(DQ )} spids: [607] ) ] spids: [607] ) ] spids: [-1 600] ) ] spids: [-1 612] ) (ForEach iter_name: i iter_words: [ { (DQ (BracedVarSub token: <VSub_Name GROUP_VERSIONS> prefix_op: VSub_Bang bracket_op: (WholeArray op_id:Lit_At) spids: [623 629] ) ) } ] do_arg_iter: False body: (DoGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:ver) op: Equal rhs: { (BracedVarSub token: <VSub_Name GROUP_VERSIONS> bracket_op: (ArrayIndex expr:(ArithVarRef name:i)) spids: [639 644] ) } spids: [638] ) ] spids: [636] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:dir) op: Equal rhs: { (BracedVarSub token: <VSub_Name GV_DIRS> bracket_op: (ArrayIndex expr:(ArithVarRef name:i)) spids: [650 655] ) } spids: [649] ) ] spids: [647] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:tmp_in_host) op: Equal rhs: {(DQ (${ VSub_Name output_tmp_in_host) (/) (${ VSub_Name ver))} spids: [660] ) ] spids: [658] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:register_file) op: Equal rhs: {(DQ (${ VSub_Name dir) (/register.go))} spids: [674] ) ] spids: [672] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:swagger_json_name) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(kube) (Lit_Other ":") (Lit_Other ":") (util) (Lit_Other ":") (Lit_Other ":") (gv-to-swagger-name) } {(DQ (${ VSub_Name ver))} ) ] ) left_token: <Left_CommandSub "$("> spids: [687 701] ) ) } spids: [685] ) ] spids: [683] ) (C {(docker)} {(run)} {(${ VSub_Name user_flags)} {(--rm)} {(-v)} {(DQ (${ VSub_Name tmp_in_host)) (Lit_Other ":") (/output) (Lit_Other ":") (z)} {(-v)} {(DQ (${ VSub_Name swagger_spec_path)) (Lit_Other ":") (/swagger-source) (Lit_Other ":") (z)} {(-v)} {(DQ (${ VSub_Name register_file)) (Lit_Other ":") (/register.go) (Lit_Other ":") (z)} {(--net) (Lit_Other "=") (host)} {(-e)} { (DQ ("https_proxy=") (BracedVarSub token: <VSub_Name KUBERNETES_HTTPS_PROXY> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [768 771] ) ) } {(gcr.io/google_containers/gen-swagger-docs) (Lit_Other ":") (v8)} {(DQ (${ VSub_Name swagger_json_name))} ) ] spids: [633 789] ) spids: [621 631] ) (SimpleCommand words: [{(pushd)} {(DQ (${ VSub_Name output_tmp))}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[805])] ) (C {(touch)} {(.generated_html)}) (Pipeline children: [ (C {(find)} {(.)} {(-type)} {(f)}) (C {(cut)} {(-sd)} {(/)} {(-f)} {(2-)}) (SimpleCommand words: [{(sort)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(.generated_html)} spids: [842] ) ] more_env: [(env_pair name:LC_ALL val:{(C)} spids:[837])] ) ] negated: False ) (SimpleCommand words: [{(popd)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[849])] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(sed)} {(--help)}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [864] ) ] more_env: [(env_pair name:LANG val:{(C)} spids:[857])] ) (C {(grep)} {(-q)} {(GNU)}) ] negated: False ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SED) op: Equal rhs: {(DQ (sed))} spids: [879] ) ] spids: [879] ) ] spids: [-1 876] ) (if_arm cond: [ (Sentence child: (C {(which)} {(gsed)}) terminator: <Op_Amp "&"> ) (Sentence child: (SimpleCommand redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/dev/null)} spids: [892] ) ] ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SED) op: Equal rhs: {(DQ (gsed))} spids: [899] ) ] spids: [899] ) ] spids: [885 896] ) ] else_action: [ (SimpleCommand words: [ {(echo)} { (DQ ( "Failed to find GNU sed as sed or gsed. If you are on Mac: brew install gnu-sed." ) ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[914])] ) (C {(exit)} {(1)}) ] spids: [905 923] ) (While cond: [(Sentence child:(C {(read)} {(file)}) terminator:<Op_Semi ";">)] body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalAnd left: (BoolUnary op_id: BoolUnary_e child: {(DQ (${ VSub_Name output_dir) (/) (${ VSub_Name file))} ) right: (BoolUnary op_id: BoolUnary_e child: {(DQ (${ VSub_Name output_tmp) (/) (${ VSub_Name file))} ) ) ) terminator: <Op_Semi ";"> ) ] action: [ (C {(echo)} { (DQ ("comparing ") (${ VSub_Name output_dir) (/) (${ VSub_Name file) (" with ") (${ VSub_Name output_tmp) (/) (${ VSub_Name file) ) } ) (C {($ VSub_Name "$SED")} {(-i)} {(SQ <"s/^Last updated.*$//">)} {(DQ (${ VSub_Name output_tmp) (/) (${ VSub_Name file))} ) (If arms: [ (if_arm cond: [ (Sentence child: (SimpleCommand words: [ {(diff)} {(-NauprB)} {(DQ (${ VSub_Name output_dir) (/) (${ VSub_Name file))} {(DQ (${ VSub_Name output_tmp) (/) (${ VSub_Name file))} ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/dev/null)} spids: [1054] ) ] ) terminator: <Op_Semi ";"> ) ] action: [ (C {(cp)} {(DQ (${ VSub_Name output_dir) (/) (${ VSub_Name file))} {(DQ (${ VSub_Name output_tmp) (/) (${ VSub_Name file))} ) ] spids: [-1 1058] ) ] spids: [-1 1088] ) ] spids: [-1 970] ) ] spids: [-1 1091] ) ] spids: [934 1094] ) redirects: [ (Redir op_id: Redir_Less fd: -1 arg_word: {(DQ (${ VSub_Name output_tmp) (/.generated_html))} spids: [1096] ) ] ) (C {(echo)} { (DQ ("Moving api reference docs from ") (${ VSub_Name output_tmp) (" to ") (${ VSub_Name output_dir) ) } ) (C {(mkdir)} {(-p)} {(DQ (${ VSub_Name output_dir))}) (C {(cp)} {(-af)} {(DQ (${ VSub_Name output_tmp)) (/) (Lit_Other "*")} {(DQ (${ VSub_Name output_dir))} ) (C {(rm)} {(-r)} {(DQ (${ VSub_Name output_tmp))}) ] spids: [343] ) spids: [333 342] ) ] )