(CommandList children: [ (C {(set)} {(-o)} {(nounset)}) (C {(set)} {(-o)} {(pipefail)}) (C {(set)} {(-o)} {(errexit)}) (Assignment keyword: Assign_Readonly pairs: [ (assign_pair lhs: (LhsName name:ROOTFS_URL) op: Equal rhs: {(http) (Lit_Other ":") ( //dl-cdn.alpinelinux.org/alpine/v3.6/releases/x86_64/alpine-minirootfs-3.6.2-x86_64.tar.gz ) } spids: [58] ) ] spids: [56] ) (Assignment keyword: Assign_Readonly pairs: [(assign_pair lhs:(LhsName name:CHROOT_DIR) op:Equal rhs:{(_chroot/alpine1)} spids:[65])] spids: [63] ) (Assignment keyword: Assign_Readonly pairs: [ (assign_pair lhs: (LhsName name:DISTRO_BUILD_CHROOT_DIR) op: Equal rhs: {(_chroot/alpine-distro-build)} spids: [71] ) ] spids: [69] ) (FuncDef name: download body: (BraceGroup children: [ (C {(wget)} {(--no-clobber)} {(--directory)} {(_tmp)} {($ VSub_Name "$ROOTFS_URL")}) ] spids: [79] ) spids: [75 78] ) (FuncDef name: _extract body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:dest) op: Equal rhs: { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {($ VSub_Name "$CHROOT_DIR")} ) spids: [105 109] ) } spids: [104] ) ] spids: [102] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:tarball) op: Equal rhs: {(_tmp/) (CommandSubPart command_list: (CommandList children: [(C {(basename)} {($ VSub_Name "$ROOTFS_URL")})] ) left_token: <Left_CommandSub "$("> spids: [117 121] ) } spids: [115] ) ] spids: [113] ) (C {(mkdir)} {(-p)} {($ VSub_Name "$dest")}) (SimpleCommand words: [ {(tar)} {(--extract)} {(--gzip)} {(--verbose)} {(--directory)} {($ VSub_Name "$dest")} ] redirects: [ (Redir op_id: Redir_Less fd: -1 arg_word: {($ VSub_Name "$tarball")} spids: [148] ) ] ) ] spids: [99] ) spids: [95 98] ) (FuncDef name: extract body: (BraceGroup children: [ (Sentence child: (C {(sudo)} {($ VSub_Number "$0")} {(_extract)} {(DQ ($ VSub_At "$@"))}) terminator: <Op_Semi ";"> ) ] spids: [158] ) spids: [154 157] ) (FuncDef name: extract-distro-build body: (BraceGroup children: [ (Sentence child: (C {(sudo)} {($ VSub_Number "$0")} {(_extract)} {($ VSub_Name "$DISTRO_BUILD_CHROOT_DIR")} ) terminator: <Op_Semi ";"> ) ] spids: [177] ) spids: [173 176] ) (FuncDef name: chmod-chroot body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:dest) op: Equal rhs: { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {($ VSub_Name "$CHROOT_DIR")} ) spids: [204 208] ) } spids: [203] ) ] spids: [201] ) (C {(sudo)} {(chmod)} {(755)} {($ VSub_Name "$dest")}) ] spids: [198] ) spids: [194 197] ) (FuncDef name: _setup-dns body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:chroot_dir) op: Equal rhs: { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {($ VSub_Name "$CHROOT_DIR")} ) spids: [236 240] ) } spids: [235] ) ] spids: [233] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$chroot_dir") (/etc/resolv.conf)} spids: [245] ) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("nameserver 8.8.8.8\n") ("nameserver 8.8.4.4\n"))} do_expansion: True here_end: EOF was_filled: True spids: [249] ) ] ) ] spids: [230] ) spids: [226 229] ) (FuncDef name: setup-dns body: (BraceGroup children: [ (Sentence child: (C {(sudo)} {($ VSub_Number "$0")} {(_setup-dns)} {(DQ ($ VSub_At "$@"))}) terminator: <Op_Semi ";"> ) ] spids: [260] ) spids: [256 259] ) (FuncDef name: add-oil-build-deps body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:chroot_dir) op: Equal rhs: { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {($ VSub_Name "$CHROOT_DIR")} ) spids: [289 293] ) } spids: [288] ) ] spids: [286] ) (SimpleCommand words: [{(sudo)} {(chroot)} {($ VSub_Name "$chroot_dir")} {(/bin/sh)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("apk update\n") ("apk add bash make gcc musl-dev \n"))} do_expansion: True here_end: EOF was_filled: True spids: [304] ) ] ) ] spids: [283] ) spids: [279 282] ) (FuncDef name: add-alpine-sdk body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:chroot_dir) op: Equal rhs: { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {($ VSub_Name "$DISTRO_BUILD_CHROOT_DIR")} ) spids: [344 348] ) } spids: [343] ) ] spids: [341] ) (SimpleCommand words: [{(sudo)} {(chroot)} {($ VSub_Name "$chroot_dir")} {(/bin/sh)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("apk update\n") ("apk add bash alpine-sdk\n"))} do_expansion: True here_end: EOF was_filled: True spids: [359] ) ] ) ] spids: [338] ) spids: [334 337] ) (FuncDef name: list-packages body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:chroot_dir) op: Equal rhs: { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {($ VSub_Name "$DISTRO_BUILD_CHROOT_DIR")} ) spids: [377 381] ) } spids: [376] ) ] spids: [374] ) (C {(sudo)} {(chroot)} {($ VSub_Name "$chroot_dir")} {(apk)} {(info)}) ] spids: [371] ) spids: [367 370] ) (FuncDef name: destroy-chroot body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:chroot_dir) op: Equal rhs: { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {($ VSub_Name "$CHROOT_DIR")} ) spids: [407 411] ) } spids: [406] ) ] spids: [404] ) (C {(sudo)} {(rm)} {(-r)} {(-rf)} {($ VSub_Name "$chroot_dir")}) ] spids: [401] ) spids: [397 400] ) (FuncDef name: enter-chroot body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:chroot_dir) op: Equal rhs: { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {($ VSub_Name "$CHROOT_DIR")} ) spids: [440 444] ) } spids: [439] ) ] spids: [437] ) (C {(shift)}) (C {(sudo)} {(chroot)} {($ VSub_Name "$chroot_dir")} {(DQ ($ VSub_At "$@"))}) ] spids: [434] ) spids: [430 433] ) (FuncDef name: interactive body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:chroot_dir) op: Equal rhs: { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {($ VSub_Name "$CHROOT_DIR")} ) spids: [473 477] ) } spids: [472] ) ] spids: [470] ) (C {(enter-chroot)} {($ VSub_Name "$chroot_dir")} {(/bin/sh)}) ] spids: [467] ) spids: [463 466] ) (Assignment keyword: Assign_Readonly pairs: [ (assign_pair lhs: (LhsName name:OIL_VERSION) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(head)} {(-n)} {(1)} {(oil-version.txt)})]) left_token: <Left_CommandSub "$("> spids: [492 500] ) } spids: [491] ) ] spids: [489] ) (FuncDef name: _copy-tar body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:name) op: Equal rhs: { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(oil)}) spids: [513 517] ) } spids: [512] ) ] spids: [510] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:version) op: Equal rhs: { (BracedVarSub token: <VSub_Number 2> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {($ VSub_Name "$OIL_VERSION")} ) spids: [523 527] ) } spids: [522] ) ] spids: [520] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:dest) op: Equal rhs: {($ VSub_Name "$CHROOT_DIR") (/src)} spids: [533] ) ] spids: [531] ) (C {(mkdir)} {(-p)} {($ VSub_Name "$dest")}) (C {(cp)} {(_release/) ($ VSub_Name "$name") (-) ($ VSub_Name "$version") (.tar.gz)} {($ VSub_Name "$dest")} ) (C {(ls)} {(-l)} {($ VSub_Name "$CHROOT_DIR") (/src)}) ] spids: [507] ) spids: [503 506] ) (FuncDef name: copy-tar body: (BraceGroup children: [ (Sentence child: (C {(sudo)} {($ VSub_Number "$0")} {(_copy-tar)} {(DQ ($ VSub_At "$@"))}) terminator: <Op_Semi ";"> ) ] spids: [569] ) spids: [565 568] ) (FuncDef name: _test-tar body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:name) op: Equal rhs: { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(oil)}) spids: [600 604] ) } spids: [599] ) ] spids: [597] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:version) op: Equal rhs: { (BracedVarSub token: <VSub_Number 2> suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {($ VSub_Name "$OIL_VERSION")} ) spids: [610 614] ) } spids: [609] ) ] spids: [607] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:target) op: Equal rhs: {(_bin/) (${ VSub_Name name) (.ovm)} spids: [620] ) ] spids: [618] ) (SimpleCommand words: [{(enter-chroot)} {(SQ )} {(/bin/sh)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("set -e\n") ("cd src\n") ("tar --extract -z < ") ($ VSub_Name "$name") (-) ($ VSub_Name "$version") (".tar.gz\n") ("cd ") ($ VSub_Name "$name") (-) ($ VSub_Name "$version") ("\n") ("./configure\n") ("time make ") ($ VSub_Name "$target") ("\n") ("echo\n") ("echo ") (Right_DoubleQuote "\"") ("*** Running ") ($ VSub_Name "$target") (Right_DoubleQuote "\"") ("\n") ("#PYTHONVERBOSE=9 \n") ($ VSub_Name "$target") (" --version\n") ("./install\n") ("echo\n") ("echo ") (Right_DoubleQuote "\"") ("*** Running osh") (Right_DoubleQuote "\"") ("\n") ("osh --version\n") ("echo status=") ($ VSub_QMark "$?") ("\n") ("echo DONE\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [640] ) ] ) ] spids: [594] ) spids: [590 593] ) (FuncDef name: test-tar body: (BraceGroup children: [ (Sentence child: (C {(sudo)} {($ VSub_Number "$0")} {(_test-tar)} {(DQ ($ VSub_At "$@"))}) terminator: <Op_Semi ";"> ) ] spids: [687] ) spids: [683 686] ) (C {(DQ ($ VSub_At "$@"))}) ] )