(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=[('KUBE_ROOT', {[ComSub (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[ComSub (Com {[LIT_CHARS dirname]} {[DQ [VarSub BASH_SOURCE]]})] [LIT_CHARS /..]}) (Com {[LIT_CHARS pwd]}) )]})]) (= 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 detect_kube_release [] (List (If (DBracket {B! {B1 UNARY_FILE_e {[DQ [VarSub KUBE_ROOT][LIT_CHARS /version]]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Can't determine Kubernetes release."]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "This script should only be run from a prebuilt Kubernetes release."]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Did you mean to use get-kube.sh instead?"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (= scope= flags=0 words=[] bindings=[('KUBERNETES_RELEASE', {[ComSub (Com {[LIT_CHARS cat]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /version]]})]})]) (= scope= flags=0 words=[] bindings=[('DOWNLOAD_URL_PREFIX', {[DQ [VarSub KUBERNETES_RELEASE_URL][LIT_CHARS /][VarSub KUBERNETES_RELEASE]]})]) ) ) (FunctionDef detect_client_info [] (List (= 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=[('CLIENT_PLATFORM', {[DQ [LIT_CHARS darwin]]})]) (= scope= flags=0 words=[] bindings=[('CLIENT_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=[('CLIENT_ARCH', {[DQ [LIT_CHARS amd64]]})]) (= scope= flags=0 words=[] bindings=[('CLIENT_ARCH', {[DQ [LIT_CHARS arm64]]})]) (= scope= flags=0 words=[] bindings=[('CLIENT_ARCH', {[DQ [LIT_CHARS arm]]})]) (= scope= flags=0 words=[] bindings=[('CLIENT_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]} ) ) ) ) ) (FunctionDef md5sum_file [] (If (Com {[LIT_CHARS which]} {[LIT_CHARS md5]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (Com {[LIT_CHARS md5]} {[LIT_CHARS -q]} {[DQ [VarSub 1]]} ) (ElseTrue) (Pipeline (Com {[LIT_CHARS md5sum]} {[DQ [VarSub 1]]} ) (Com {[LIT_CHARS awk]} {[SQ ]} ) ) ) ) (FunctionDef sha1sum_file [] (If (Com {[LIT_CHARS which]} {[LIT_CHARS sha1sum]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (Pipeline (Com {[LIT_CHARS sha1sum]} {[DQ [VarSub 1]]} ) (Com {[LIT_CHARS awk]} {[SQ ]} ) ) (ElseTrue) (Pipeline (Com {[LIT_CHARS shasum]} {[LIT_CHARS -a1]} {[DQ [VarSub 1]]} ) (Com {[LIT_CHARS awk]} {[SQ ]} ) ) ) ) (FunctionDef download_tarball [] (List (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('download_path', {[DQ [VarSub 1]]})]) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('file', {[DQ [VarSub 2]]})]) (= scope= flags=0 words=[] bindings=[('url', {[DQ [VarSub DOWNLOAD_URL_PREFIX][LIT_CHARS /][VarSub file]]})]) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [VarSub download_path]]} ) (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 url]]} {[LIT_CHARS -o]} {[DQ [VarSub download_path][LIT_CHARS /][VarSub file]]} ) (DBracket {B1 UNARY_STRING_n {[ComSub (Com {[LIT_CHARS which]} {[LIT_CHARS wget]})]}}) (Com {[LIT_CHARS wget]} {[DQ [VarSub url]]} {[LIT_CHARS -O]} {[DQ [VarSub download_path][LIT_CHARS /][VarSub file]]} ) (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]} ) ) ) (Com {[LIT_CHARS echo]} ) (= scope= flags=0 words=[] bindings=[('md5sum', {[ComSub (Com {[LIT_CHARS md5sum_file]} {[DQ [VarSub download_path][LIT_CHARS /][VarSub file]]})]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "md5sum("][VarSub file][LIT_CHARS ")="][VarSub md5sum]]} ) (= scope= flags=0 words=[] bindings=[('sha1sum', {[ComSub (Com {[LIT_CHARS sha1sum_file]} {[DQ [VarSub download_path][LIT_CHARS /][VarSub file]]})]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "sha1sum("][VarSub file][LIT_CHARS ")="][VarSub sha1sum]]} ) (Com {[LIT_CHARS echo]} ) ) ) (FunctionDef extract_arch_tarball [] (List (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('tarfile', {[DQ [VarSub 1]]})]) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('platform', {[DQ [VarSub 2]]})]) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('arch', {[DQ [VarSub 3]]})]) (= scope= flags=0 words=[] bindings=[('platforms_dir', {[DQ [VarSub KUBE_ROOT][LIT_CHARS /platforms/][VarSub platform][LIT_CHARS /][VarSub arch]]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Extracting "][VarSub tarfile][LIT_CHARS " into "][VarSub platforms_dir]]} ) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [VarSub platforms_dir]]} ) (Com {[LIT_CHARS tar]} {[LIT_CHARS -xzf]} {[DQ [VarSub tarfile]]} {[LIT_CHARS --strip-components]} {[LIT_CHARS 3]} {[LIT_CHARS -C]} {[DQ [VarSub platforms_dir]]} ) (Com {[LIT_CHARS ln]} {[LIT_CHARS -sf]} {[DQ [VarSub platforms_dir]]} {[DQ [ComSub (Com {[LIT_CHARS dirname]} {[VarSub tarfile]})][LIT_CHARS /bin]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Add '"][ComSub (Com {[LIT_CHARS dirname]} {[VarSub tarfile]})][LIT_CHARS "/bin' to your PATH to use newly-installed binaries."]]} ) ) ) (Com {[LIT_CHARS detect_kube_release]} ) (= scope= flags=0 words=[] bindings=[('SERVER_PLATFORM', {[DQ [LIT_CHARS linux]]})]) (= scope= flags=0 words=[] bindings=[('SERVER_ARCH', {[DQ [VarSub KUBERNETES_SERVER_ARCH test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS amd64]}]]})]) (= scope= flags=0 words=[] bindings=[('SERVER_TAR', {[DQ [LIT_CHARS kubernetes-server-][VarSub SERVER_PLATFORM][LIT_CHARS -][VarSub SERVER_ARCH][LIT_CHARS .tar.gz]]})]) (Com {[LIT_CHARS detect_client_info]} ) (= scope= flags=0 words=[] bindings=[('CLIENT_TAR', {[DQ [LIT_CHARS kubernetes-client-][VarSub CLIENT_PLATFORM][LIT_CHARS -][VarSub CLIENT_ARCH][LIT_CHARS .tar.gz]]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Kubernetes release: "][VarSub KUBERNETES_RELEASE]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Server: "][VarSub SERVER_PLATFORM][LIT_CHARS /][VarSub SERVER_ARCH]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Client: "][VarSub CLIENT_PLATFORM][LIT_CHARS /][VarSub CLIENT_ARCH]]} ) (Com {[LIT_CHARS echo]} ) (= scope= flags=0 words=[] bindings=[('DOWNLOAD_SERVER_TAR', {[LIT_CHARS false]})]) (If (DBracket {B! {B1 UNARY_FILE_e {[DQ [VarSub KUBE_ROOT][LIT_CHARS /server/][VarSub SERVER_TAR]]}}}) (List (= scope= flags=0 words=[] bindings=[('DOWNLOAD_SERVER_TAR', {[LIT_CHARS true]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Will download "][VarSub SERVER_TAR][LIT_CHARS " from "][VarSub DOWNLOAD_URL_PREFIX]]} ) ) ) (= scope= flags=0 words=[] bindings=[('DOWNLOAD_CLIENT_TAR', {[LIT_CHARS false]})]) (If (DBracket {B! {B1 UNARY_FILE_x {[DQ [VarSub KUBE_ROOT][LIT_CHARS /platforms/][VarSub CLIENT_PLATFORM][LIT_CHARS /][VarSub CLIENT_ARCH][LIT_CHARS /kubectl]]}}}) (List (= scope= flags=0 words=[] bindings=[('DOWNLOAD_CLIENT_TAR', {[LIT_CHARS true]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Will download and extract "][VarSub CLIENT_TAR][LIT_CHARS " from "][VarSub DOWNLOAD_URL_PREFIX]]} ) ) ) (= scope= flags=0 words=[] bindings=[('TESTS_TAR', {[DQ [LIT_CHARS kubernetes-test.tar.gz]]})]) (= scope= flags=0 words=[] bindings=[('DOWNLOAD_TESTS_TAR', {[LIT_CHARS false]})]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub KUBERNETES_DOWNLOAD_TESTS test_op=VS_TEST_HYPHEN {}]]}}) (List (= scope= flags=0 words=[] bindings=[('DOWNLOAD_TESTS_TAR', {[LIT_CHARS true]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Will download and extract "][VarSub TESTS_TAR][LIT_CHARS " from "][VarSub DOWNLOAD_URL_PREFIX]]} ) ) ) (If (DBracket {B? LOGICAL_BINARY_AND {B2 BINARY_STRING_EQUAL {[DQ [VarSub DOWNLOAD_CLIENT_TAR]]} {[LIT_CHARS false]}} {B? LOGICAL_BINARY_AND {B2 BINARY_STRING_EQUAL {[DQ [VarSub DOWNLOAD_SERVER_TAR]]} {[LIT_CHARS false]}} {B2 BINARY_STRING_EQUAL {[DQ [VarSub DOWNLOAD_TESTS_TAR]]} {[LIT_CHARS false]}}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Nothing additional to download."]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 0]} ) ) ) (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 DOWNLOAD_SERVER_TAR]]} ) (Com {[LIT_CHARS download_tarball]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /server]]} {[DQ [VarSub SERVER_TAR]]} ) ) (If (Com {[DQ [VarSub DOWNLOAD_CLIENT_TAR]]} ) (List (Com {[LIT_CHARS download_tarball]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /client]]} {[DQ [VarSub CLIENT_TAR]]} ) (Com {[LIT_CHARS extract_arch_tarball]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /client/][VarSub CLIENT_TAR]]} {[DQ [VarSub CLIENT_PLATFORM]]} {[DQ [VarSub CLIENT_ARCH]]} ) ) ) (If (Com {[DQ [VarSub DOWNLOAD_TESTS_TAR]]} ) (List (Com {[LIT_CHARS download_tarball]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /test]]} {[DQ [VarSub TESTS_TAR]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Extracting "][VarSub TESTS_TAR][LIT_CHARS " into "][VarSub KUBE_ROOT]]} ) (Com {[LIT_CHARS tar]} {[LIT_CHARS -xzf]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /test/][VarSub TESTS_TAR]]} {[LIT_CHARS --strip-components]} {[LIT_CHARS 1]} {[LIT_CHARS -C]} {[DQ [VarSub KUBE_ROOT]]} ) ) ) )