(List (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS errexit]} ) (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS nounset]} ) (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS pipefail]} ) (= scope= flags=0 words=[] bindings=[('KUBERNETES_RELEASE_URL', {[DQ [VarSub KUBERNETES_RELEASE_URL test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS "https:"] [LIT_SLASH /] [LIT_SLASH /] [LIT_CHARS storage.googleapis.com] [LIT_SLASH /] [LIT_CHARS kubernetes-release] [LIT_SLASH /] [LIT_CHARS release]}]]})]) (FunctionDef download_kube_binaries [] (Subshell (List (Com {[LIT_CHARS cd]} {[LIT_CHARS kubernetes]} ) (If (DBracket {B1 UNARY_FILE_x {[LIT_CHARS ./cluster/get-kube-binaries.sh]}}) (Com {[LIT_CHARS ./cluster/get-kube-binaries.sh]} ) ) ) ) ) (FunctionDef create_cluster [] (List (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub KUBERNETES_SKIP_CREATE_CLUSTER test_op=VS_TEST_HYPHEN {}]]}}) (Com {[LIT_CHARS exit]} {[LIT_CHARS 0]} ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Creating a kubernetes on "][VarSub KUBERNETES_PROVIDER test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS gce]}][LIT_CHARS ...]]} ) (Subshell (List (Com {[LIT_CHARS cd]} {[LIT_CHARS kubernetes]} ) (Com {[LIT_CHARS ./cluster/kube-up.sh]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Kubernetes binaries at "][VarSub PWD][LIT_CHARS /cluster/]]} ) (If (DBracket {B2 BINARY_STRING_NOT_EQUAL {[DQ [LIT_CHARS ":"][VarSub PATH][LIT_CHARS ":"]]} {[LIT_OTHER "*"] [DQ [LIT_CHARS ":"][VarSub PWD][LIT_CHARS "/cluster:"]] [LIT_OTHER "*"]}}) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "You may want to add this directory to your PATH in "][\ LIT_ESCAPED_CHAR "\\$"][LIT_CHARS HOME/.profile]]} ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Installation successful!"]]} ) ) ) ) ) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub KUBERNETES_SKIP_DOWNLOAD test_op=VS_TEST_HYPHEN {}]]}}) (List (Com {[LIT_CHARS create_cluster]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 0]} ) ) ) (If (DBracket {B1 UNARY_FILE_d {[DQ [LIT_CHARS ./kubernetes]]}}) (If (DBracket {B1 UNARY_STRING_z {[DQ [VarSub KUBERNETES_SKIP_CONFIRM test_op=VS_TEST_HYPHEN {}]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "'kubernetes' directory already exist. Should we skip download step and start to create cluster based on it? [Y]/n"]]} ) (Com {[LIT_CHARS read]} {[LIT_CHARS confirm]} ) (If (DBracket {B! {B2 BINARY_STRING_TILDE_EQUAL {[DQ [VarSub confirm]]} {[LIT_OTHER "^"] [LIT_DBRACKET_LIKE "["] [LIT_CHARS nN] [LIT_DBRACKET_LIKE "]"] [LIT_OTHER "$"]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Skipping download step."]]} ) (Com {[LIT_CHARS create_cluster]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 0]} ) ) ) ) ) ) (FunctionDef get_latest_version_number [] (List (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('latest_url', {[DQ [LIT_CHARS "https://storage.googleapis.com/kubernetes-release/release/stable.txt"]]})]) (If (DBracket {B1 UNARY_STRING_n {[ComSub (Com {[LIT_CHARS which]} {[LIT_CHARS wget]})]}}) (Com {[LIT_CHARS wget]} {[LIT_CHARS -qO-]} {[DQ [VarSub latest_url]]} ) (DBracket {B1 UNARY_STRING_n {[ComSub (Com {[LIT_CHARS which]} {[LIT_CHARS curl]})]}}) (Com {[LIT_CHARS curl]} {[LIT_CHARS -Ssf]} {[LIT_CHARS --retry]} {[LIT_CHARS 3]} {[LIT_CHARS --keepalive-time]} {[LIT_CHARS 2]} {[DQ [VarSub latest_url]]} ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Couldn't find curl or wget. Bailing out."]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 4]} ) ) ) ) ) (= scope= flags=0 words=[] bindings=[('kernel', {[ComSub (Com {[LIT_CHARS uname]} {[LIT_CHARS -s]})]})]) (Case to_match={[DQ [VarSub kernel]]}, pat_word_list=[[{[LIT_CHARS Darwin]}], [{[LIT_CHARS Linux]}], [{[LIT_OTHER "*"]}]] (= scope= flags=0 words=[] bindings=[('platform', {[DQ [LIT_CHARS darwin]]})]) (= scope= flags=0 words=[] bindings=[('platform', {[DQ [LIT_CHARS linux]]})]) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Unknown, unsupported platform: "][VarSub kernel][LIT_CHARS .]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Supported platforms: Linux, Darwin."]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Bailing out."]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 2]} ) ) ) (= scope= flags=0 words=[] bindings=[('machine', {[ComSub (Com {[LIT_CHARS uname]} {[LIT_CHARS -m]})]})]) (Case to_match={[DQ [VarSub machine]]}, pat_word_list=[[{[LIT_CHARS x86_64] [LIT_OTHER "*"]}, {[LIT_CHARS i] [LIT_OTHER "?"] [LIT_CHARS 86_64] [LIT_OTHER "*"]}, {[LIT_CHARS amd64] [LIT_OTHER "*"]}], [{[LIT_CHARS aarch64] [LIT_OTHER "*"]}, {[LIT_CHARS arm64] [LIT_OTHER "*"]}], [{[LIT_CHARS arm] [LIT_OTHER "*"]}], [{[LIT_CHARS i] [LIT_OTHER "?"] [LIT_CHARS 86] [LIT_OTHER "*"]}], [{[LIT_OTHER "*"]}]] (= scope= flags=0 words=[] bindings=[('arch', {[DQ [LIT_CHARS amd64]]})]) (= scope= flags=0 words=[] bindings=[('arch', {[DQ [LIT_CHARS arm64]]})]) (= scope= flags=0 words=[] bindings=[('arch', {[DQ [LIT_CHARS arm]]})]) (= scope= flags=0 words=[] bindings=[('arch', {[DQ [LIT_CHARS 386]]})]) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Unknown, unsupported architecture ("][VarSub machine][LIT_CHARS ")."]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Supported architectures x86_64, i686, arm, arm64."]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Bailing out."]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 3]} ) ) ) (= scope= flags=0 words=[] bindings=[('file', {[LIT_CHARS kubernetes.tar.gz]})]) (= scope= flags=0 words=[] bindings=[('release', {[VarSub KUBERNETES_RELEASE test_op=VS_TEST_COLON_HYPHEN {[ComSub (Com {[LIT_CHARS get_latest_version_number]})]}]})]) (= scope= flags=0 words=[] bindings=[('release_url', {[DQ [VarSub KUBERNETES_RELEASE_URL][LIT_CHARS /][VarSub release][LIT_CHARS /][VarSub file]]})]) (= scope= flags=0 words=[] bindings=[('need_download', {[LIT_CHARS true]})]) (If (DBracket {B1 UNARY_FILE_r {[DQ [VarSub PWD][LIT_CHARS /][VarSub file]]}}) (List (= scope= flags=0 words=[] bindings=[('downloaded_version', {[ComSub (AndOr OP_OR_IF (Com redirects=[(FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 2)]{[LIT_CHARS tar]} {[LIT_CHARS -xzOf]} {[DQ [VarSub PWD][LIT_CHARS /][VarSub file]]} {[LIT_CHARS kubernetes/version]}) (Com {[LIT_CHARS true]}) )]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Found preexisting "][VarSub file][LIT_CHARS ", release "][VarSub downloaded_version]]} ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub downloaded_version]]} {[DQ [VarSub release]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Using preexisting kubernetes.tar.gz"]]} ) (= scope= flags=0 words=[] bindings=[('need_download', {[LIT_CHARS false]})]) ) ) ) ) (If (Com {[DQ [VarSub need_download]]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Downloading kubernetes release "][VarSub release]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " from "][VarSub release_url]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " to "][VarSub PWD][LIT_CHARS /][VarSub file]]} ) ) ) (If (DBracket {B1 UNARY_FILE_e {[DQ [VarSub PWD][LIT_CHARS /kubernetes]]}}) (List (If (DBracket {B! {B1 UNARY_FILE_f {[DQ [VarSub PWD][LIT_CHARS /kubernetes/version]]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [VarSub PWD][LIT_CHARS "/kubernetes exists but does not look like a Kubernetes release."]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Aborting!"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 5]} ) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Will also delete preexisting 'kubernetes' directory."]]} ) ) ) (If (DBracket {B1 UNARY_STRING_z {[DQ [VarSub KUBERNETES_SKIP_CONFIRM test_op=VS_TEST_HYPHEN {}]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Is this ok? [Y]/n"]]} ) (Com {[LIT_CHARS read]} {[LIT_CHARS confirm]} ) (If (DBracket {B2 BINARY_STRING_TILDE_EQUAL {[DQ [VarSub confirm]]} {[LIT_OTHER "^"] [LIT_DBRACKET_LIKE "["] [LIT_CHARS nN] [LIT_DBRACKET_LIKE "]"] [LIT_OTHER "$"]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS Aborting.]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 0]} ) ) ) ) ) (If (Com {[DQ [VarSub need_download]]} ) (If (DBracket {B1 UNARY_STRING_n {[ComSub (Com {[LIT_CHARS which]} {[LIT_CHARS curl]})]}}) (Com {[LIT_CHARS curl]} {[LIT_CHARS -L]} {[LIT_CHARS --retry]} {[LIT_CHARS 3]} {[LIT_CHARS --keepalive-time]} {[LIT_CHARS 2]} {[DQ [VarSub release_url]]} {[LIT_CHARS -o]} {[DQ [VarSub file]]} ) (DBracket {B1 UNARY_STRING_n {[ComSub (Com {[LIT_CHARS which]} {[LIT_CHARS wget]})]}}) (Com {[LIT_CHARS wget]} {[DQ [VarSub release_url]]} ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Couldn't find curl or wget. Bailing out."]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Unpacking kubernetes release "][VarSub release]]} ) (Com {[LIT_CHARS rm]} {[LIT_CHARS -rf]} {[DQ [VarSub PWD][LIT_CHARS /kubernetes]]} ) (Com {[LIT_CHARS tar]} {[LIT_CHARS -xzf]} {[VarSub file]} ) (Com {[LIT_CHARS download_kube_binaries]} ) (Com {[LIT_CHARS create_cluster]} ) )