(command.CommandList
  children: [
    (command.Simple blame_tok:<set> more_env:[] words:[{<set>} {<-e>}] redirects:[] do_fork:T)
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <Id.Lit_LBracket '['>
          more_env: []
          words: [
            {<Id.Lit_LBracket '['>}
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    blame_tok: <id>
                    more_env: []
                    words: [{<id>} {<-u>}]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Eof_RParen _>
              )
            }
            {<-eq>}
            {<0>}
            {<Id.Lit_RBracket ']'>}
          ]
          redirects: []
          do_fork: T
        )
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <printf>
              more_env: []
              words: [{<printf>} {(SQ <'%s requires root\\n'>)} {(DQ ($ Id.VSub_Number 0))}]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.ShFunction
      name_tok: <usage>
      name: usage
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <printf>
              more_env: []
              words: [
                {<printf>}
                {(SQ <'%s: [-r release] [-m mirror] [-s] [-c additional repository] [-a arch]\\n'>)}
                {(DQ ($ Id.VSub_Number 0))}
              ]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <tmp>
      name: tmp
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'TMP='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'TMP='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'TMP='> name:TMP)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <mktemp>
                            more_env: []
                            words: [
                              {<mktemp>}
                              {<-d>}
                              {
                                (BracedVarSub
                                  left: <Id.Left_DollarBrace '${'>
                                  token: <Id.VSub_Name TMPDIR>
                                  var_name: TMPDIR
                                  suffix_op: 
                                    (suffix_op.Unary
                                      op: <Id.VTest_ColonHyphen _>
                                      arg_word: {<Id.Lit_Slash '/'> <var> <Id.Lit_Slash '/'> <tmp>}
                                    )
                                  right: <Id.Right_DollarBrace '}'>
                                ) <'/alpine-docker-XXXXXXXXXX'>
                              }
                            ]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'ROOTFS='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'ROOTFS='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ROOTFS='> name:ROOTFS)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <mktemp>
                            more_env: []
                            words: [
                              {<mktemp>}
                              {<-d>}
                              {
                                (BracedVarSub
                                  left: <Id.Left_DollarBrace '${'>
                                  token: <Id.VSub_Name TMPDIR>
                                  var_name: TMPDIR
                                  suffix_op: 
                                    (suffix_op.Unary
                                      op: <Id.VTest_ColonHyphen _>
                                      arg_word: {<Id.Lit_Slash '/'> <var> <Id.Lit_Slash '/'> <tmp>}
                                    )
                                  right: <Id.Right_DollarBrace '}'>
                                ) <'/alpine-docker-rootfs-XXXXXXXXXX'>
                              }
                            ]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <trap>
              more_env: []
              words: [
                {<trap>}
                {(DQ <'rm -rf '> ($ Id.VSub_DollarName TMP) <' '> ($ Id.VSub_DollarName ROOTFS))}
                {<EXIT>}
                {<TERM>}
                {<INT>}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <apkv>
      name: apkv
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Pipeline
              children: [
                (command.Simple
                  blame_tok: <curl>
                  more_env: []
                  words: [
                    {<curl>}
                    {<-sSL>}
                    {($ Id.VSub_DollarName MAINREPO) <'/'> ($ Id.VSub_DollarName ARCH) 
                      <'/APKINDEX.tar.gz'>
                    }
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <tar>
                  more_env: []
                  words: [{<tar>} {<-Oxz>}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <grep>
                  more_env: []
                  words: [{<grep>} {<--text>} {(SQ <'^P:apk-tools-static$'>)} {<-A1>}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <tail>
                  more_env: []
                  words: [{<tail>} {<-n1>}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <cut>
                  more_env: []
                  words: [{<cut>} {<-d> <Id.Lit_Colon ':'>} {<-f2>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_Pipe _> <Id.Op_Pipe _> <Id.Op_Pipe _> <Id.Op_Pipe _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <getapk>
      name: getapk
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Pipeline
              children: [
                (command.Simple
                  blame_tok: <curl>
                  more_env: []
                  words: [
                    {<curl>}
                    {<-sSL>}
                    {($ Id.VSub_DollarName MAINREPO) <'/'> ($ Id.VSub_DollarName ARCH) 
                      <'/apk-tools-static-'> 
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <apkv>
                            more_env: []
                            words: [{<apkv>}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      ) <.apk>
                    }
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <tar>
                  more_env: []
                  words: [{<tar>} {<-xz>} {<-C>} {($ Id.VSub_DollarName TMP)} {<'sbin/apk.static'>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_Pipe _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <mkbase>
      name: mkbase
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <Id.VSub_DollarName '$TMP'>
              more_env: []
              words: [
                {($ Id.VSub_DollarName TMP) <'/sbin/apk.static'>}
                {<--repository>}
                {($ Id.VSub_DollarName MAINREPO)}
                {<--update-cache>}
                {<--allow-untrusted>}
                {<--root>}
                {($ Id.VSub_DollarName ROOTFS)}
                {<--initdb>}
                {<add>}
                {<alpine-base>}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <conf>
      name: conf
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <printf>
              more_env: []
              words: [{<printf>} {(SQ <'%s\\n'>)} {($ Id.VSub_DollarName MAINREPO)}]
              redirects: [
                (Redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName ROOTFS) <'/etc/apk/repositories'>}
                )
              ]
              do_fork: T
            )
            (command.Simple
              blame_tok: <printf>
              more_env: []
              words: [{<printf>} {(SQ <'%s\\n'>)} {($ Id.VSub_DollarName ADDITIONALREPO)}]
              redirects: [
                (Redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName ROOTFS) <'/etc/apk/repositories'>}
                )
              ]
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <pack>
      name: pack
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <local>
              more_env: []
              words: [{<local>} {<id>}]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'id='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'id='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'id='> name:id)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (command.Simple
                                blame_tok: <tar>
                                more_env: []
                                words: [
                                  {<tar>}
                                  {<--numeric-owner>}
                                  {<-C>}
                                  {($ Id.VSub_DollarName ROOTFS)}
                                  {<-c>}
                                  {<.>}
                                ]
                                redirects: []
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <docker>
                                more_env: []
                                words: [
                                  {<docker>}
                                  {<Id.KW_Import import>}
                                  {<->}
                                  {<alpine> <Id.Lit_Colon ':'> ($ Id.VSub_DollarName REL)}
                                ]
                                redirects: []
                                do_fork: T
                              )
                            ]
                            ops: [<Id.Op_Pipe _>]
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <docker>
              more_env: []
              words: [
                {<docker>}
                {<tag>}
                {($ Id.VSub_DollarName id)}
                {<alpine> <Id.Lit_Colon ':'> <latest>}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <docker>
              more_env: []
              words: [
                {<docker>}
                {<run>}
                {<-i>}
                {<-t>}
                {<--rm>}
                {<alpine>}
                {<printf>}
                {(SQ <'alpine:%s with id=%s created!\\n'>)}
                {($ Id.VSub_DollarName REL)}
                {($ Id.VSub_DollarName id)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <save>
      name: save
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <Id.Lit_LBracket '['>
                  more_env: []
                  words: [
                    {<Id.Lit_LBracket '['>}
                    {($ Id.VSub_DollarName SAVE)}
                    {<-eq>}
                    {<1>}
                    {<Id.Lit_RBracket ']'>}
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.ControlFlow
                  keyword: <Id.ControlFlow_Return return>
                  arg_word: {<0>}
                )
              ]
              ops: [<Id.Op_DPipe _>]
            )
            (command.Pipeline
              children: [
                (command.Simple
                  blame_tok: <tar>
                  more_env: []
                  words: [{<tar>} {<--numeric-owner>} {<-C>} {($ Id.VSub_DollarName ROOTFS)} {<-c>} {<.>}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <xz>
                  more_env: []
                  words: [{<xz>}]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<rootfs.tar.xz>}
                    )
                  ]
                  do_fork: T
                )
              ]
              ops: [<Id.Op_Pipe _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <getopts>
                  more_env: []
                  words: [{<getopts>} {(DQ <'hr:m:sc:a:'>)} {<opt>}]
                  redirects: []
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Case
              case_kw: <Id.KW_Case case>
              to_match: (case_arg.Word w:{($ Id.VSub_DollarName opt)})
              arms_start: <Id.KW_In in>
              arms: [
                (CaseArm
                  left: <r>
                  pattern: (pat.Words words:[{<r>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'REL='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'REL='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'REL='> name:REL)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName OPTARG)}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <m>
                  pattern: (pat.Words words:[{<m>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'MIRROR='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'MIRROR='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MIRROR='> name:MIRROR)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName OPTARG)}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <s>
                  pattern: (pat.Words words:[{<s>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'SAVE='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'SAVE='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SAVE='> name:SAVE)
                          op: assign_op.Equal
                          rhs: {<1>}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <c>
                  pattern: (pat.Words words:[{<c>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'ADDITIONALREPO='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'ADDITIONALREPO='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'ADDITIONALREPO='>
                              name: ADDITIONALREPO
                            )
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName OPTARG)}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <a>
                  pattern: (pat.Words words:[{<a>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'ARCH='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'ARCH='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ARCH='> name:ARCH)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName OPTARG)}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <Id.Lit_Star '*'>
                  pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.Simple
                      blame_tok: <usage>
                      more_env: []
                      words: [{<usage>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
              ]
              arms_end: <Id.KW_Esac esac>
              redirects: []
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'REL='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'REL='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'REL='> name:REL)
          op: assign_op.Equal
          rhs: 
            {
              (BracedVarSub
                left: <Id.Left_DollarBrace '${'>
                token: <Id.VSub_Name REL>
                var_name: REL
                suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:{<edge>})
                right: <Id.Right_DollarBrace '}'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'MIRROR='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'MIRROR='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MIRROR='> name:MIRROR)
          op: assign_op.Equal
          rhs: 
            {
              (BracedVarSub
                left: <Id.Left_DollarBrace '${'>
                token: <Id.VSub_Name MIRROR>
                var_name: MIRROR
                suffix_op: 
                  (suffix_op.Unary
                    op: <Id.VTest_ColonHyphen _>
                    arg_word: 
                      {<'http:'> <Id.Lit_Slash '/'> <Id.Lit_Slash '/'> <nl.alpinelinux.org> 
                        <Id.Lit_Slash '/'> <alpine>
                      }
                  )
                right: <Id.Right_DollarBrace '}'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'SAVE='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'SAVE='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SAVE='> name:SAVE)
          op: assign_op.Equal
          rhs: 
            {
              (BracedVarSub
                left: <Id.Left_DollarBrace '${'>
                token: <Id.VSub_Name SAVE>
                var_name: SAVE
                suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:{<0>})
                right: <Id.Right_DollarBrace '}'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'MAINREPO='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'MAINREPO='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MAINREPO='> name:MAINREPO)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName MIRROR) <'/'> ($ Id.VSub_DollarName REL) <'/main'>}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ADDITIONALREPO='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ADDITIONALREPO='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ADDITIONALREPO='> name:ADDITIONALREPO)
          op: assign_op.Equal
          rhs: 
            {($ Id.VSub_DollarName MIRROR) <'/'> ($ Id.VSub_DollarName REL) <'/'> 
              (BracedVarSub
                left: <Id.Left_DollarBrace '${'>
                token: <Id.VSub_Name ADDITIONALREPO>
                var_name: ADDITIONALREPO
                suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:{<community>})
                right: <Id.Right_DollarBrace '}'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'ARCH='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'ARCH='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ARCH='> name:ARCH)
          op: assign_op.Equal
          rhs: 
            {
              (BracedVarSub
                left: <Id.Left_DollarBrace '${'>
                token: <Id.VSub_Name ARCH>
                var_name: ARCH
                suffix_op: 
                  (suffix_op.Unary
                    op: <Id.VTest_ColonHyphen _>
                    arg_word: 
                      {
                        (CommandSub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (command.Simple
                              blame_tok: <uname>
                              more_env: []
                              words: [{<uname>} {<-m>}]
                              redirects: []
                              do_fork: T
                            )
                          right: <Id.Eof_RParen _>
                        )
                      }
                  )
                right: <Id.Right_DollarBrace '}'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple blame_tok:<tmp> more_env:[] words:[{<tmp>}] redirects:[] do_fork:T)
    (command.Simple blame_tok:<getapk> more_env:[] words:[{<getapk>}] redirects:[] do_fork:T)
    (command.Simple blame_tok:<mkbase> more_env:[] words:[{<mkbase>}] redirects:[] do_fork:T)
    (command.Simple blame_tok:<conf> more_env:[] words:[{<conf>}] redirects:[] do_fork:T)
    (command.Simple blame_tok:<pack> more_env:[] words:[{<pack>}] redirects:[] do_fork:T)
    (command.Simple blame_tok:<save> more_env:[] words:[{<save>}] redirects:[] do_fork:T)
  ]
)