(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=[('IMAGE_REPO', {[VarSub IMAGE_REPO test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS mesosphere] [LIT_SLASH /] [LIT_CHARS kubernetes-mesos]}]})]) (= scope= flags=0 words=[] bindings=[('IMAGE_TAG', {[VarSub IMAGE_TAG test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS latest]}]})]) (= scope= flags=0 words=[] bindings=[('script_dir', {[ComSub (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[ComSub (Com {[LIT_CHARS dirname]} {[DQ [VarSub BASH_SOURCE]]})]}) (Com {[LIT_CHARS pwd]} {[LIT_CHARS -P]}) )]})]) (= scope= flags=0 words=[] bindings=[('KUBE_ROOT', {[ComSub (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[VarSub script_dir] [LIT_CHARS /../../../..]}) (Com {[LIT_CHARS pwd]} {[LIT_CHARS -P]}) )]})]) (FunctionDef find-binary [] (List (= scope= flags=0 words=[] bindings=[('lookfor', {[DQ [VarSub 1]]})]) (= scope= flags=0 words=[] bindings=[('platform', {[DQ [VarSub 2]]})]) (= scope= flags=0 words=[] bindings=[('locations', {[Array {OP_NEWLINE "\n"} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /_output/dockerized/bin/][VarSub platform][LIT_CHARS /][VarSub lookfor]]} {OP_NEWLINE "\n"} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /_output/local/bin/][VarSub platform][LIT_CHARS /][VarSub lookfor]]} {OP_NEWLINE "\n"} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /platforms/][VarSub platform][LIT_CHARS /][VarSub lookfor]]} {OP_NEWLINE "\n"}]})]) (= scope= flags=0 words=[] bindings=[('bin', {[ComSub (Pipeline (Subshell (AndOr OP_OR_IF (Com redirects=[(FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 2)]{[LIT_CHARS ls]} {[LIT_CHARS -t]} {[DQ [VarSub locations bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]}) (Com {[LIT_CHARS true]}) ) ) (Com {[LIT_CHARS head]} {[LIT_CHARS -1]}) )]})]) (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[DQ [VarSub bin]]} ) ) ) (= scope= flags=0 words=[] bindings=[('km_path', {[ComSub (Com {[LIT_CHARS find-binary]} {[LIT_CHARS km]} {[LIT_CHARS linux/amd64]})]})]) (If (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -z]} {[DQ [VarSub km_path]]} {[LIT_DBRACKET_LIKE "]"]} ) (List (= scope= flags=0 words=[] bindings=[('km_path', {[ComSub (Com {[LIT_CHARS find-binary]} {[LIT_CHARS km]} {[LIT_CHARS darwin/amd64]})]})]) (If (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -z]} {[DQ [VarSub km_path]]} {[LIT_DBRACKET_LIKE "]"]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Failed to find km binary"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (= scope= flags=0 words=[] bindings=[('kube_bin_path', {[ComSub (Com {[LIT_CHARS dirname]} {[VarSub km_path]})]})]) (= scope= flags=0 words=[] bindings=[('common_bin_path', {[ComSub (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[VarSub script_dir] [LIT_CHARS /../common/bin]}) (Com {[LIT_CHARS pwd]} {[LIT_CHARS -P]}) )]})]) (= scope= flags=0 words=[] bindings=[('overlay_dir', {[VarSub MESOS_DOCKER_OVERLAY_DIR test_op=VS_TEST_COLON_HYPHEN {[VarSub script_dir] [LIT_SLASH /] [LIT_CHARS overlay]}]})]) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [VarSub overlay_dir]]} ) (Com {[LIT_CHARS docker]} {[LIT_CHARS run]} {[LIT_CHARS --rm]} {[LIT_CHARS -v]} {[DQ [VarSub overlay_dir][LIT_CHARS ":/target"]]} {[LIT_CHARS jpetazzo/nsenter]} ) (Com {[LIT_CHARS docker]} {[LIT_CHARS run]} {[LIT_CHARS --rm]} {[LIT_CHARS -v]} {[DQ [VarSub overlay_dir][LIT_CHARS ":/target"]]} {[LIT_CHARS mesosphere/kubernetes-socat]} ) (Com {[LIT_CHARS cd]} {[DQ [VarSub KUBE_ROOT]]} ) (= scope= flags=0 words=[] bindings=[('workspace', {[ComSub (Com {[LIT_CHARS env]} {[LIT_VAR_LIKE "TMPDIR="] [VarSub PWD] =} {[LIT_CHARS mktemp]} {[LIT_CHARS -d]} {[LIT_CHARS -t]} {[DQ [LIT_CHARS k8sm-workspace-XXXXXX]]})]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Workspace created: "][VarSub workspace]]} ) (FunctionDef cleanup [] (List (Com {[LIT_CHARS rm]} {[LIT_CHARS -rf]} {[DQ [VarSub workspace]]} ) (Com {[LIT_CHARS rm]} {[LIT_CHARS -f]} {[DQ [VarSub overlay_dir][LIT_CHARS "/*"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Workspace deleted: "][VarSub workspace]]} ) ) ) (Com {[LIT_CHARS trap]} {[SQ ]} {[LIT_CHARS EXIT]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Copying files to workspace"]]} ) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [VarSub workspace][LIT_CHARS /bin]]} ) (Com {[LIT_CHARS cp]} {[DQ [VarSub common_bin_path][LIT_CHARS /]] [LIT_OTHER "*"]} {[DQ [VarSub workspace][LIT_CHARS /bin/]]} ) (Com {[LIT_CHARS cp]} {[DQ [VarSub kube_bin_path][LIT_CHARS /km]]} {[DQ [VarSub workspace][LIT_CHARS /bin/]]} ) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [VarSub workspace][LIT_CHARS /opt]]} ) (Com {[LIT_CHARS cp]} {[DQ [VarSub script_dir][LIT_CHARS /opt/]] [LIT_OTHER "*"]} {[DQ [VarSub workspace][LIT_CHARS /opt/]]} ) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [VarSub workspace][LIT_CHARS /overlay/bin]]} ) (Com {[LIT_CHARS cp]} {[LIT_CHARS -a]} {[DQ [VarSub overlay_dir][LIT_CHARS /nsenter]]} {[DQ [VarSub workspace][LIT_CHARS /overlay/bin]]} ) (Com {[LIT_CHARS cp]} {[LIT_CHARS -a]} {[DQ [VarSub overlay_dir][LIT_CHARS /socat]]} {[DQ [VarSub workspace][LIT_CHARS /overlay/bin]]} ) (Com {[LIT_CHARS chmod]} {[LIT_OTHER "+"] [LIT_CHARS x]} {[DQ [VarSub workspace][LIT_CHARS /overlay/bin/]] [LIT_OTHER "*"]} ) (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[DQ [VarSub workspace][LIT_CHARS /overlay]]} ) (AndOr OP_AND_IF (Com {[LIT_CHARS tar]} {[LIT_CHARS -czvf]} {[DQ [VarSub workspace][LIT_CHARS /opt/sandbox-overlay.tar.gz]]} {[LIT_CHARS .]} ) (Com {[LIT_CHARS cd]} {[LIT_CHARS -]} ) ) ) (Com {[LIT_CHARS cp]} {[DQ [VarSub script_dir][LIT_CHARS /Dockerfile]]} {[DQ [VarSub workspace][LIT_CHARS /]]} ) (Com {[LIT_CHARS cd]} {[DQ [VarSub workspace]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Building docker image "][VarSub IMAGE_REPO][LIT_CHARS ":"][VarSub IMAGE_TAG]]} ) (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS xtrace]} ) (Com {[LIT_CHARS docker]} {[LIT_CHARS build]} {[LIT_CHARS -t]} {[VarSub IMAGE_REPO] [LIT_OTHER ":"] [VarSub IMAGE_TAG]} {[DQ [VarSub @]]} {[LIT_CHARS .]} ) (Com {[LIT_CHARS set]} {[LIT_OTHER "+"] [LIT_CHARS o]} {[LIT_CHARS xtrace]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Built docker image "][VarSub IMAGE_REPO][LIT_CHARS ":"][VarSub IMAGE_TAG]]} ) )