(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: 
            {
              (SQ 
                <
'http://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: 16777215
                  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: 16777215
                  arg_word: {($ VSub_Name '$chroot_dir') (/etc/resolv.conf)}
                  spids: [245]
                )
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: {(DQ ('nameserver 8.8.8.8\n') ('nameserver 8.8.4.4\n'))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: T
                  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: [261]
        )
      spids: [257 260]
    )
    (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: [290 294]
                      )
                    }
                  spids: [289]
                )
              ]
              spids: [287]
            )
            (SimpleCommand
              words: [{(sudo)} {(chroot)} {($ VSub_Name '$chroot_dir')} {(/bin/sh)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: {(DQ ('apk update\n') ('apk add bash make gcc musl-dev \n'))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: T
                  spids: [305]
                )
              ]
            )
          ]
          spids: [284]
        )
      spids: [280 283]
    )
    (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: [346 350]
                      )
                    }
                  spids: [345]
                )
              ]
              spids: [343]
            )
            (SimpleCommand
              words: [{(sudo)} {(chroot)} {($ VSub_Name '$chroot_dir')} {(/bin/sh)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: {(DQ ('apk update\n') ('apk add bash alpine-sdk\n'))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: T
                  spids: [361]
                )
              ]
            )
          ]
          spids: [340]
        )
      spids: [336 339]
    )
    (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: [380 384]
                      )
                    }
                  spids: [379]
                )
              ]
              spids: [377]
            )
            (C {(sudo)} {(chroot)} {($ VSub_Name '$chroot_dir')} {(apk)} {(info)})
          ]
          spids: [374]
        )
      spids: [370 373]
    )
    (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: [410 414]
                      )
                    }
                  spids: [409]
                )
              ]
              spids: [407]
            )
            (C {(sudo)} {(rm)} {(-r)} {(-rf)} {($ VSub_Name '$chroot_dir')})
          ]
          spids: [404]
        )
      spids: [400 403]
    )
    (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: [443 447]
                      )
                    }
                  spids: [442]
                )
              ]
              spids: [440]
            )
            (C {(shift)})
            (C {(sudo)} {(chroot)} {($ VSub_Name '$chroot_dir')} {(DQ ($ VSub_At '$@'))})
          ]
          spids: [437]
        )
      spids: [433 436]
    )
    (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: [476 480]
                      )
                    }
                  spids: [475]
                )
              ]
              spids: [473]
            )
            (C {(enter-chroot)} {($ VSub_Name '$chroot_dir')} {(/bin/sh)})
          ]
          spids: [470]
        )
      spids: [466 469]
    )
    (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: [495 503]
              )
            }
          spids: [494]
        )
      ]
      spids: [492]
    )
    (FuncDef
      name: _copy-tar
      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: [523 527]
                      )
                    }
                  spids: [522]
                )
              ]
              spids: [520]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:name)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 2>
                        suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(oil)})
                        spids: [533 537]
                      )
                    }
                  spids: [532]
                )
              ]
              spids: [530]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:version)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 3>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_ColonHyphen
                            arg_word: {($ VSub_Name '$OIL_VERSION')}
                          )
                        spids: [543 547]
                      )
                    }
                  spids: [542]
                )
              ]
              spids: [540]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:dest)
                  op: Equal
                  rhs: {($ VSub_Name '$chroot_dir') (/src)}
                  spids: [553]
                )
              ]
              spids: [551]
            )
            (C {(mkdir)} {(-p)} {($ VSub_Name '$dest')})
            (C {(cp)} {(-v)} {(_release/) ($ VSub_Name '$name') (-) ($ VSub_Name '$version') (.tar.gz)} 
              {($ VSub_Name '$dest')}
            )
          ]
          spids: [517]
        )
      spids: [513 516]
    )
    (FuncDef
      name: copy-tar
      body: 
        (BraceGroup
          children: [
            (Sentence
              child: (C {(sudo)} {($ VSub_Number '$0')} {(_copy-tar)} {(DQ ($ VSub_At '$@'))})
              terminator: <Op_Semi ';'>
            )
          ]
          spids: [583]
        )
      spids: [579 582]
    )
    (FuncDef
      name: _test-tar
      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: [609 613]
                      )
                    }
                  spids: [608]
                )
              ]
              spids: [606]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:name)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 2>
                        suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(oil)})
                        spids: [619 623]
                      )
                    }
                  spids: [618]
                )
              ]
              spids: [616]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:version)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 3>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_ColonHyphen
                            arg_word: {($ VSub_Name '$OIL_VERSION')}
                          )
                        spids: [629 633]
                      )
                    }
                  spids: [628]
                )
              ]
              spids: [626]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:target)
                  op: Equal
                  rhs: {(_bin/) (${ VSub_Name name) (.ovm)}
                  spids: [639]
                )
              ]
              spids: [637]
            )
            (SimpleCommand
              words: [{(enter-chroot)} {(DQ ($ VSub_Name '$chroot_dir'))} {(/bin/sh)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  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: T
                  spids: [660]
                )
              ]
            )
          ]
          spids: [603]
        )
      spids: [599 602]
    )
    (FuncDef
      name: test-tar
      body: 
        (BraceGroup
          children: [
            (Sentence
              child: (C {(sudo)} {($ VSub_Number '$0')} {(_test-tar)} {(DQ ($ VSub_At '$@'))})
              terminator: <Op_Semi ';'>
            )
          ]
          spids: [708]
        )
      spids: [704 707]
    )
    (C {(DQ ($ VSub_At '$@'))})
  ]
)