(command.CommandList children: [ (C {(Id.KW_Set set)} {(-o)} {(nounset)}) (C {(Id.KW_Set set)} {(-o)} {(pipefail)}) (C {(Id.KW_Set set)} {(-o)} {(errexit)}) (C {(readonly)} {(Id.Lit_VarLike 'ROOTFS_URL=') (SQ (Token id: Id.Lit_Chars val: 'http://dl-cdn.alpinelinux.org/alpine/v3.6/releases/x86_64/alpine-minirootfs-3.6.2-x86_64.tar.gz' span_id: 60 ) ) } ) (C {(readonly)} {(Id.Lit_VarLike 'CHROOT_DIR=') (_chroot/alpine1)}) (C {(readonly)} {(Id.Lit_VarLike 'DISTRO_BUILD_CHROOT_DIR=') (_chroot/alpine-distro-build)}) (command.ShFunction name: download body: (command.BraceGroup children: [ (C {(wget)} {(--no-clobber)} {(--directory)} {(_tmp)} {($ Id.VSub_DollarName '$ROOTFS_URL')}) ] ) ) (command.ShFunction name: _extract body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'dest=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:106) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$CHROOT_DIR')} ) ) } ) (C {(local)} {(Id.Lit_VarLike 'tarball=') (_tmp/) (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:117) command_list: (command.CommandList children: [(C {(basename)} {($ Id.VSub_DollarName '$ROOTFS_URL')})] ) ) } ) (C {(mkdir)} {(-p)} {($ Id.VSub_DollarName '$dest')}) (command.Simple words: [ {(tar)} {(--extract)} {(--gzip)} {(--verbose)} {(--directory)} {($ Id.VSub_DollarName '$dest')} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Less val:'<' span_id:148) fd: -1 arg_word: {($ Id.VSub_DollarName '$tarball')} ) ] ) ] ) ) (command.ShFunction name: extract body: (command.BraceGroup children: [ (command.Sentence child: (C {(sudo)} {($ Id.VSub_Number '$0')} {(_extract)} {(DQ ($ Id.VSub_At '$@'))}) terminator: (Token id:Id.Op_Semi val:';' span_id:169) ) ] ) ) (command.ShFunction name: extract-distro-build body: (command.BraceGroup children: [ (command.Sentence child: (C {(sudo)} {($ Id.VSub_Number '$0')} {(_extract)} {($ Id.VSub_DollarName '$DISTRO_BUILD_CHROOT_DIR')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:186) ) ] ) ) (command.ShFunction name: chmod-chroot body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'dest=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:205) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$CHROOT_DIR')} ) ) } ) (C {(sudo)} {(chmod)} {(755)} {($ Id.VSub_DollarName '$dest')}) ] ) ) (command.ShFunction name: _setup-dns body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'chroot_dir=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:237) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$CHROOT_DIR')} ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:245) fd: -1 arg_word: {($ Id.VSub_DollarName '$chroot_dir') (/etc/resolv.conf)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:249) fd: -1 here_begin: {(EOF)} here_end_span_id: 255 stdin_parts: [('nameserver 8.8.8.8\n') ('nameserver 8.8.4.4\n')] ) ] ) ] ) ) (command.ShFunction name: setup-dns body: (command.BraceGroup children: [ (command.Sentence child: (C {(sudo)} {($ Id.VSub_Number '$0')} {(_setup-dns)} {(DQ ($ Id.VSub_At '$@'))}) terminator: (Token id:Id.Op_Semi val:';' span_id:273) ) ] ) ) (command.ShFunction name: add-oil-build-deps body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'chroot_dir=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:292) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$CHROOT_DIR')} ) ) } ) (command.Simple words: [{(sudo)} {(chroot)} {($ Id.VSub_DollarName '$chroot_dir')} {(/bin/sh)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:306) fd: -1 here_begin: {(EOF)} here_end_span_id: 312 stdin_parts: [('apk update\n') ('apk add bash make gcc musl-dev \n')] ) ] ) ] ) ) (command.ShFunction name: add-alpine-sdk body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'chroot_dir=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:349) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$DISTRO_BUILD_CHROOT_DIR')} ) ) } ) (command.Simple words: [{(sudo)} {(chroot)} {($ Id.VSub_DollarName '$chroot_dir')} {(/bin/sh)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:363) fd: -1 here_begin: {(EOF)} here_end_span_id: 369 stdin_parts: [('apk update\n') ('apk add bash alpine-sdk\n')] ) ] ) ] ) ) (command.ShFunction name: list-packages body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'chroot_dir=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:384) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$DISTRO_BUILD_CHROOT_DIR')} ) ) } ) (C {(sudo)} {(chroot)} {($ Id.VSub_DollarName '$chroot_dir')} {(apk)} {(info)}) ] ) ) (command.ShFunction name: destroy-chroot body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'chroot_dir=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:414) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$CHROOT_DIR')} ) ) } ) (C {(sudo)} {(rm)} {(-r)} {(-rf)} {($ Id.VSub_DollarName '$chroot_dir')}) ] ) ) (command.ShFunction name: enter-chroot body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'chroot_dir=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:447) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$CHROOT_DIR')} ) ) } ) (C {(shift)}) (C {(sudo)} {(chroot)} {($ Id.VSub_DollarName '$chroot_dir')} {(DQ ($ Id.VSub_At '$@'))}) ] ) ) (command.ShFunction name: interactive body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'chroot_dir=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:480) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$CHROOT_DIR')} ) ) } ) (C {(enter-chroot)} {($ Id.VSub_DollarName '$chroot_dir')} {(/bin/sh)}) ] ) ) (C {(readonly)} {(Id.Lit_VarLike 'OIL_VERSION=') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:498) command_list: (command.CommandList children: [(C {(head)} {(-n)} {(1)} {(oil-version.txt)})] ) ) } ) (command.ShFunction name: _copy-tar body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'chroot_dir=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:527) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$CHROOT_DIR')} ) ) } ) (C {(local)} {(Id.Lit_VarLike 'name=') (braced_var_sub token: (Token id:Id.VSub_Number val:2 span_id:537) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(oil)}) ) } ) (C {(local)} {(Id.Lit_VarLike 'version=') (braced_var_sub token: (Token id:Id.VSub_Number val:3 span_id:547) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$OIL_VERSION')} ) ) } ) (C {(local)} {(Id.Lit_VarLike 'dest=') ($ Id.VSub_DollarName '$chroot_dir') (/src)}) (C {(mkdir)} {(-p)} {($ Id.VSub_DollarName '$dest')}) (C {(cp)} {(-v)} {(_release/) ($ Id.VSub_DollarName '$name') (-) ($ Id.VSub_DollarName '$version') (.tar.gz) } {($ Id.VSub_DollarName '$dest')} ) ] ) ) (command.ShFunction name: copy-tar body: (command.BraceGroup children: [ (command.Sentence child: (C {(sudo)} {($ Id.VSub_Number '$0')} {(_copy-tar)} {(DQ ($ Id.VSub_At '$@'))}) terminator: (Token id:Id.Op_Semi val:';' span_id:597) ) ] ) ) (command.ShFunction name: _test-tar body: (command.BraceGroup children: [ (C {(local)} {(Id.Lit_VarLike 'chroot_dir=') (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:613) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$CHROOT_DIR')} ) ) } ) (C {(local)} {(Id.Lit_VarLike 'name=') (braced_var_sub token: (Token id:Id.VSub_Number val:2 span_id:623) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(oil)}) ) } ) (C {(local)} {(Id.Lit_VarLike 'version=') (braced_var_sub token: (Token id:Id.VSub_Number val:3 span_id:633) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$OIL_VERSION')} ) ) } ) (C {(local)} {(Id.Lit_VarLike 'target=') (_bin/) (${ Id.VSub_Name name) (.ovm)}) (command.Simple words: [{(enter-chroot)} {(DQ ($ Id.VSub_DollarName '$chroot_dir'))} {(/bin/sh)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:663) fd: -1 here_begin: {(EOF)} here_end_span_id: 705 stdin_parts: [ ('set -e\n') ('cd src\n') ('tar --extract -z < ') ($ Id.VSub_DollarName '$name') (-) ($ Id.VSub_DollarName '$version') ('.tar.gz\n') ('cd ') ($ Id.VSub_DollarName '$name') (-) ($ Id.VSub_DollarName '$version') ('\n') ('./configure\n') ('time make ') ($ Id.VSub_DollarName '$target') ('\n') ('echo\n') ('echo ') (Id.Right_DoubleQuote '"') ('*** Running ') ($ Id.VSub_DollarName '$target') (Id.Right_DoubleQuote '"') ('\n') ('#PYTHONVERBOSE=9 \n') ($ Id.VSub_DollarName '$target') (' --version\n') ('./install\n') ('echo\n') ('echo ') (Id.Right_DoubleQuote '"') ('*** Running osh') (Id.Right_DoubleQuote '"') ('\n') ('osh --version\n') ('echo status=') ($ Id.VSub_QMark '$?') ('\n') ('echo DONE\n') ] ) ] ) ] ) ) (command.ShFunction name: test-tar body: (command.BraceGroup children: [ (command.Sentence child: (C {(sudo)} {($ Id.VSub_Number '$0')} {(_test-tar)} {(DQ ($ Id.VSub_At '$@'))}) terminator: (Token id:Id.Op_Semi val:';' span_id:723) ) ] ) ) (C {(DQ ($ Id.VSub_At '$@'))}) ] )