(command.CommandList
  children: [
    (command.Simple
      blame_tok: <set>
      more_env: []
      words: [{<set>} {<-o>} {<nounset>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <set>
      more_env: []
      words: [{<set>} {<-o>} {<pipefail>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <set>
      more_env: []
      words: [{<set>} {<-o>} {<errexit>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <readonly>
      more_env: []
      words: [
        {<readonly>}
        {<Id.Lit_VarLike 'ROOTFS_URL='> 
          (SQ 
            <
'http://distfiles.gentoo.org/releases/amd64/autobuilds/20180116T214503Z/stage3-amd64-20180116T214503Z.tar.xz'
            >
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <readonly>
      more_env: []
      words: [{<readonly>} {<Id.Lit_VarLike 'CHROOT_DIR='> <'_chroot/gentoo'>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <readonly>
      more_env: []
      words: [
        {<readonly>}
        {<Id.Lit_VarLike 'PORTAGE_URL='> 
          (SQ <'http://distfiles.gentoo.org/snapshots/portage-20180202.tar.xz'>)
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <download>
      name: download
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <wget>
              more_env: []
              words: [
                {<wget>}
                {<--no-clobber>}
                {<--directory>}
                {<_tmp>}
                {($ Id.VSub_DollarName ROOTFS_URL)}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <wget>
              more_env: []
              words: [
                {<wget>}
                {<--no-clobber>}
                {<--directory>}
                {<_tmp>}
                {($ Id.VSub_DollarName PORTAGE_URL)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <_extract>
      name: _extract
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [
                {<local>}
                {<Id.Lit_VarLike 'dest='> 
                  (BracedVarSub
                    left: <Id.Left_DollarBrace '${'>
                    token: <Id.VSub_Number 1>
                    var_name: 1
                    suffix_op: 
                      (suffix_op.Unary
                        op: <Id.VTest_ColonHyphen _>
                        arg_word: {($ Id.VSub_DollarName CHROOT_DIR)}
                      )
                    right: <Id.Right_DollarBrace '}'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [
                {<local>}
                {<Id.Lit_VarLike 'tarball='> <'_tmp/'> 
                  (CommandSub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Simple
                        blame_tok: <basename>
                        more_env: []
                        words: [{<basename>} {($ Id.VSub_DollarName ROOTFS_URL)}]
                        redirects: []
                        do_fork: T
                      )
                    right: <Id.Eof_RParen _>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <mkdir>
              more_env: []
              words: [{<mkdir>} {<-p>} {($ Id.VSub_DollarName dest)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <tar>
              more_env: []
              words: [{<tar>} {<--extract>} {<--xz>} {<--directory>} {($ Id.VSub_DollarName dest)}]
              redirects: [
                (Redir
                  op: <Id.Redir_Less '<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: {($ Id.VSub_DollarName tarball)}
                )
              ]
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <extract>
      name: extract
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <sudo>
                  more_env: []
                  words: [{<sudo>} {($ Id.VSub_Number 0)} {<_extract>} {(DQ ($ Id.VSub_At '@'))}]
                  redirects: []
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <_extract-portage>
      name: _extract-portage
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [
                {<local>}
                {<Id.Lit_VarLike 'dest='> 
                  (BracedVarSub
                    left: <Id.Left_DollarBrace '${'>
                    token: <Id.VSub_Number 1>
                    var_name: 1
                    suffix_op: 
                      (suffix_op.Unary
                        op: <Id.VTest_ColonHyphen _>
                        arg_word: {($ Id.VSub_DollarName CHROOT_DIR)}
                      )
                    right: <Id.Right_DollarBrace '}'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<Id.Lit_VarLike 'portage_dest='> ($ Id.VSub_DollarName dest) <'/usr'>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [
                {<local>}
                {<Id.Lit_VarLike 'tarball='> <'_tmp/'> 
                  (CommandSub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Simple
                        blame_tok: <basename>
                        more_env: []
                        words: [{<basename>} {($ Id.VSub_DollarName PORTAGE_URL)}]
                        redirects: []
                        do_fork: T
                      )
                    right: <Id.Eof_RParen _>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <tar>
              more_env: []
              words: [{<tar>} {<--extract>} {<--xz>} {<--directory>} {($ Id.VSub_DollarName portage_dest)}]
              redirects: [
                (Redir
                  op: <Id.Redir_Less '<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: {($ Id.VSub_DollarName tarball)}
                )
              ]
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <extract-portage>
      name: extract-portage
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <sudo>
                  more_env: []
                  words: [{<sudo>} {($ Id.VSub_Number 0)} {<_extract-portage>} {(DQ ($ Id.VSub_At '@'))}]
                  redirects: []
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <_mount-dirs>
      name: _mount-dirs
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <mount>
              more_env: []
              words: [{<mount>} {<--rbind>} {<'/dev'>} {($ Id.VSub_DollarName CHROOT_DIR) <'/dev'>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <mount>
              more_env: []
              words: [{<mount>} {<--make-rslave>} {($ Id.VSub_DollarName CHROOT_DIR) <'/dev'>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <mount>
              more_env: []
              words: [
                {<mount>}
                {<-t>}
                {<Id.KW_Proc proc>}
                {<'/proc'>}
                {($ Id.VSub_DollarName CHROOT_DIR) <'/proc'>}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <mount>
              more_env: []
              words: [{<mount>} {<--rbind>} {<'/sys'>} {($ Id.VSub_DollarName CHROOT_DIR) <'/sys'>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <mount>
              more_env: []
              words: [{<mount>} {<--make-rslave>} {($ Id.VSub_DollarName CHROOT_DIR) <'/sys'>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <mount>
              more_env: []
              words: [{<mount>} {<--rbind>} {<'/tmp'>} {($ Id.VSub_DollarName CHROOT_DIR) <'/tmp'>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <mount-dirs>
      name: mount-dirs
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <sudo>
                  more_env: []
                  words: [{<sudo>} {($ Id.VSub_Number 0)} {<_mount-dirs>} {(DQ ($ Id.VSub_At '@'))}]
                  redirects: []
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <_setup-portage>
      name: _setup-portage
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <cp>
              more_env: []
              words: [
                {<cp>}
                {<-v>}
                {($ Id.VSub_DollarName CHROOT_DIR) <'/usr/share/portage/config/make.conf.example'>}
                {($ Id.VSub_DollarName CHROOT_DIR) <'/etc/portage'>}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <setup-portage>
      name: setup-portage
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <sudo>
                  more_env: []
                  words: [{<sudo>} {($ Id.VSub_Number 0)} {<_setup-portage>} {(DQ ($ Id.VSub_At '@'))}]
                  redirects: []
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <add-oil-build-deps>
      name: add-oil-build-deps
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [
                {<local>}
                {<Id.Lit_VarLike 'chroot_dir='> 
                  (BracedVarSub
                    left: <Id.Left_DollarBrace '${'>
                    token: <Id.VSub_Number 1>
                    var_name: 1
                    suffix_op: 
                      (suffix_op.Unary
                        op: <Id.VTest_ColonHyphen _>
                        arg_word: {($ Id.VSub_DollarName CHROOT_DIR)}
                      )
                    right: <Id.Right_DollarBrace '}'>
                  )
                }
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <sudo>
              more_env: []
              words: [{<sudo>} {<chroot>} {($ Id.VSub_DollarName chroot_dir)} {<'/bin/sh'>}]
              redirects: [
                (Redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      here_begin: {<EOF>}
                      here_end_tok: <Id.Undefined_Tok ''>
                      stdin_parts: [<'apk update\n'> <'apk add bash make gcc musl-dev \n'>]
                    )
                )
              ]
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <Id.Left_DoubleQuote '"'>
      more_env: []
      words: [{(DQ ($ Id.VSub_At '@'))}]
      redirects: []
      do_fork: T
    )
  ]
)