(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike 'NANO_PKG_DUMP='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'NANO_PKG_DUMP='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'NANO_PKG_DUMP='> name:NANO_PKG_DUMP)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 1)}
        )
      ]
      redirects: []
    )
    (command.Sentence
      child: (command.Simple blame_tok:<shift> more_env:[] words:[{<shift>}] redirects:[] do_fork:T)
      terminator: <Id.Op_Semi _>
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {<Id.KW_Bang '!'>}
                        {<-d>}
                        {($ Id.VSub_DollarName NANO_PKG_DUMP)}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ ($ Id.VSub_DollarName NANO_PKG_DUMP) <' not a directory'>)}]
              redirects: [(Redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [109 123]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'NANO_PACKAGE_DIR='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'NANO_PACKAGE_DIR='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'NANO_PACKAGE_DIR='> name:NANO_PACKAGE_DIR)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 1)}
        )
      ]
      redirects: []
    )
    (command.Sentence
      child: (command.Simple blame_tok:<shift> more_env:[] words:[{<shift>}] redirects:[] do_fork:T)
      terminator: <Id.Op_Semi _>
    )
    (command.ShFunction
      name_tok: <ports_recurse>
      name: ports_recurse
      body: 
        (command.Subshell
          left: <Id.Op_LParen _>
          child: 
            (command.CommandList
              children: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'of='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'of='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'of='> name:of)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_Number 1)}
                    )
                  ]
                  redirects: []
                )
                (command.Simple
                  blame_tok: <shift>
                  more_env: []
                  words: [{<shift>}]
                  redirects: []
                  do_fork: T
                )
                (command.ForEach
                  keyword: <Id.KW_For for>
                  iter_names: [d]
                  iterable: (for_iter__Args)
                  body: 
                    (command.DoGroup
                      left: <Id.KW_Do do>
                      children: [
                        (command.If
                          if_kw: <Id.KW_If if>
                          arms: [
                            (IfArm
                              keyword: <Id.KW_If if>
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.Simple
                                          blame_tok: <Id.Lit_LBracket '['>
                                          more_env: []
                                          words: [
                                            {<Id.Lit_LBracket '['>}
                                            {<Id.KW_Bang '!'>}
                                            {<-d>}
                                            {($ Id.VSub_DollarName d)}
                                            {<Id.Lit_RBracket ']'>}
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              then_kw: <Id.KW_Then then>
                              action: [
                                (command.Simple
                                  blame_tok: <echo>
                                  more_env: []
                                  words: [{<echo>} {(DQ <'Missing port '> ($ Id.VSub_DollarName d))}]
                                  redirects: [
                                    (Redir
                                      op: <Id.Redir_GreatAnd '1>&'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<2>}
                                    )
                                  ]
                                  do_fork: T
                                )
                                (command.ControlFlow
                                  keyword: <Id.ControlFlow_Exit exit>
                                  arg_word: {<2>}
                                )
                              ]
                              spids: [173 187]
                            )
                          ]
                          else_action: []
                          fi_kw: <Id.KW_Fi fi>
                          redirects: []
                        )
                        (command.If
                          if_kw: <Id.KW_If if>
                          arms: [
                            (IfArm
                              keyword: <Id.KW_If if>
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.Simple
                                          blame_tok: <grep>
                                          more_env: []
                                          words: [
                                            {<grep>}
                                            {<-q>}
                                            {
                                              (DQ <'^'> ($ Id.VSub_DollarName d) 
                                                (word_part.EscapedLiteral
                                                  token: <Id.Lit_EscapedChar '\\$'>
                                                  ch: '$'
                                                )
                                              )
                                            }
                                            {($ Id.VSub_DollarName of)}
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              then_kw: <Id.KW_Then then>
                              action: [
                                (command.Simple
                                  blame_tok: <true>
                                  more_env: []
                                  words: [{<true>}]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              spids: [209 225]
                            )
                          ]
                          else_kw: <Id.KW_Else else>
                          else_action: [
                            (command.Subshell
                              left: <Id.Op_LParen _>
                              child: 
                                (command.CommandList
                                  children: [
                                    (command.Simple
                                      blame_tok: <cd>
                                      more_env: []
                                      words: [{<cd>} {($ Id.VSub_DollarName d)}]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.ShAssignment
                                      left: <Id.Lit_VarLike 'rd='>
                                      pairs: [
                                        (AssignPair
                                          left: <Id.Lit_VarLike 'rd='>
                                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rd='> name:rd)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (CommandSub
                                                left_token: <Id.Left_Backtick '`'>
                                                child: 
                                                  (command.Simple
                                                    blame_tok: <make>
                                                    more_env: []
                                                    words: [
                                                      {<make>}
                                                      {<-V>}
                                                      {<RUN_DEPENDS>}
                                                      {(${ Id.VSub_Name PORTS_OPTS)}
                                                    ]
                                                    redirects: []
                                                    do_fork: T
                                                  )
                                                right: <Id.Backtick_Right '`'>
                                              )
                                            }
                                        )
                                      ]
                                      redirects: []
                                    )
                                    (command.ShAssignment
                                      left: <Id.Lit_VarLike 'ld='>
                                      pairs: [
                                        (AssignPair
                                          left: <Id.Lit_VarLike 'ld='>
                                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ld='> name:ld)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (CommandSub
                                                left_token: <Id.Left_Backtick '`'>
                                                child: 
                                                  (command.Simple
                                                    blame_tok: <make>
                                                    more_env: []
                                                    words: [
                                                      {<make>}
                                                      {<-V>}
                                                      {<LIB_DEPENDS>}
                                                      {(${ Id.VSub_Name PORTS_OPTS)}
                                                    ]
                                                    redirects: []
                                                    do_fork: T
                                                  )
                                                right: <Id.Backtick_Right '`'>
                                              )
                                            }
                                        )
                                      ]
                                      redirects: []
                                    )
                                    (command.ForEach
                                      keyword: <Id.KW_For for>
                                      iter_names: [x]
                                      iterable: 
                                        (for_iter.Words
                                          words: [
                                            {($ Id.VSub_DollarName rd)}
                                            {($ Id.VSub_DollarName ld)}
                                          ]
                                        )
                                      body: 
                                        (command.DoGroup
                                          left: <Id.KW_Do do>
                                          children: [
                                            (command.Simple
                                              blame_tok: <ports_recurse>
                                              more_env: []
                                              words: [
                                                {<ports_recurse>}
                                                {($ Id.VSub_DollarName of)}
                                                {
                                                  (CommandSub
                                                    left_token: <Id.Left_Backtick '`'>
                                                    child: 
                                                      (command.Pipeline
                                                        children: [
                                                          (command.Simple
                                                            blame_tok: <echo>
                                                            more_env: []
                                                            words: [{<echo>} {($ Id.VSub_DollarName x)}]
                                                            redirects: []
                                                            do_fork: T
                                                          )
                                                          (command.Simple
                                                            blame_tok: <sed>
                                                            more_env: []
                                                            words: [
                                                              {<sed>}
                                                              {(SQ <'s/^[^:]*:\\([^:]*\\).*$/\\1/'>)}
                                                            ]
                                                            redirects: []
                                                            do_fork: T
                                                          )
                                                        ]
                                                        ops: [<Id.Op_Pipe _>]
                                                      )
                                                    right: <Id.Backtick_Right '`'>
                                                  )
                                                }
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                          ]
                                          right: <Id.KW_Done done>
                                        )
                                      redirects: []
                                    )
                                  ]
                                )
                              right: <Id.Right_Subshell _>
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <echo>
                              more_env: []
                              words: [{<echo>} {($ Id.VSub_DollarName d)}]
                              redirects: [
                                (Redir
                                  op: <Id.Redir_DGreat '>>'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {($ Id.VSub_DollarName of)}
                                )
                              ]
                              do_fork: T
                            )
                          ]
                          fi_kw: <Id.KW_Fi fi>
                          redirects: []
                        )
                      ]
                      right: <Id.KW_Done done>
                    )
                  redirects: []
                )
              ]
            )
          right: <Id.Right_Subshell _>
          redirects: []
        )
    )
    (command.Simple
      blame_tok: <rm>
      more_env: []
      words: [{<rm>} {<-rf>} {($ Id.VSub_DollarName NANO_PACKAGE_DIR)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <mkdir>
      more_env: []
      words: [{<mkdir>} {<-p>} {($ Id.VSub_DollarName NANO_PACKAGE_DIR)}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'PL='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'PL='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PL='> name:PL)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName NANO_PACKAGE_DIR) <'/_list'>}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <true>
      more_env: []
      words: [{<true>}]
      redirects: [
        (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{($ Id.VSub_DollarName PL)})
      ]
      do_fork: T
    )
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [i]
      iterable: (for_iter__Args)
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Simple
              blame_tok: <ports_recurse>
              more_env: []
              words: [
                {<ports_recurse>}
                {
                  (CommandSub
                    left_token: <Id.Left_Backtick '`'>
                    child: 
                      (command.Simple
                        blame_tok: <pwd>
                        more_env: []
                        words: [{<pwd>}]
                        redirects: []
                        do_fork: T
                      )
                    right: <Id.Backtick_Right '`'>
                  ) <'/'> ($ Id.VSub_DollarName PL)
                }
                {($ Id.VSub_DollarName i)}
              ]
              redirects: []
              do_fork: T
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
    (command.ForEach
      keyword: <Id.KW_For for>
      iter_names: [i]
      iterable: 
        (for_iter.Words
          words: [
            {
              (CommandSub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Simple
                    blame_tok: <cat>
                    more_env: []
                    words: [{<cat>} {($ Id.VSub_DollarName PL)}]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Backtick_Right '`'>
              )
            }
          ]
        )
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'p='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'p='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'p='> name:p)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Subshell
                            left: <Id.Op_LParen _>
                            child: 
                              (command.AndOr
                                children: [
                                  (command.Simple
                                    blame_tok: <cd>
                                    more_env: []
                                    words: [{<cd>} {($ Id.VSub_DollarName i)}]
                                    redirects: []
                                    do_fork: T
                                  )
                                  (command.Simple
                                    blame_tok: <make>
                                    more_env: []
                                    words: [{<make>} {<-V>} {<PKGNAME>}]
                                    redirects: []
                                    do_fork: T
                                  )
                                ]
                                ops: [<Id.Op_DAmp _>]
                              )
                            right: <Id.Right_Subshell _>
                            redirects: []
                          )
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {<-f>}
                                {($ Id.VSub_DollarName NANO_PKG_DUMP) <'/'> ($ Id.VSub_DollarName p) 
                                  <.t> <Id.Lit_LBracket '['> <bx> <Id.Lit_RBracket ']'> <z>
                                }
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <ln>
                      more_env: []
                      words: [
                        {<ln>}
                        {<-s>}
                        {($ Id.VSub_DollarName NANO_PKG_DUMP) <'/'> ($ Id.VSub_DollarName p) <.t> 
                          <Id.Lit_LBracket '['> <bx> <Id.Lit_RBracket ']'> <z>
                        }
                        {($ Id.VSub_DollarName NANO_PACKAGE_DIR)}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [425 444]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.Simple
                  blame_tok: <echo>
                  more_env: []
                  words: [
                    {<echo>}
                    {
                      (DQ <'Package '> ($ Id.VSub_DollarName p) <' misssing in '> 
                        ($ Id.VSub_DollarName NANO_PKG_DUMP)
                      )
                    }
                  ]
                  redirects: [(Redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                  do_fork: T
                )
                (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
    (command.Simple
      blame_tok: <rm>
      more_env: []
      words: [{<rm>} {<-f>} {($ Id.VSub_DollarName PL)}]
      redirects: []
      do_fork: T
    )
    (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)