(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:pdir)
          op: assign_op.Equal
          rhs: {<Packages>}
          spids: [4]
        )
      ]
    )
    (command.ForEach
      iter_name: d
      iter_words: [{<Id.Lit_Star '*'> <'/build'>}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:dir)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: <Id.Left_Backtick '`'>
                          child: 
                            (command.Pipeline
                              children: [
                                (C {<echo>} {($ Id.VSub_DollarName '$d')})
                                (C {<sed>} {(SQ <'s/\\/build$//'>)})
                              ]
                              negated: F
                            )
                        )
                      )
                    }
                  spids: [20]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                          {($ Id.VSub_DollarName '$pdir') <'/'> ($ Id.VSub_DollarName '$dir') <.tar.gz>} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {(DQ <' * '> ($ Id.VSub_DollarName '$dir'))})
                    (C {<binpackage>} {($ Id.VSub_DollarName '$dir')} {($ Id.VSub_DollarName '$pdir')})
                  ]
                  spids: [42 58]
                )
              ]
            )
          ]
        )
    )
  ]
)