(CommandList
  children: [
    (C {(set)} {(-e)})
    (C {(export)} {(Lit_VarLike 'ASSUME_ALWAYS_YES=') (DQ (YES))})
    (C {(export)} {(Lit_VarLike 'PKG_DBDIR=') (DQ (/tmp/pkg))})
    (C {(export)} {(Lit_VarLike 'PERMISSIVE=') (DQ (YES))})
    (C {(export)} {(Lit_VarLike 'REPO_AUTOUPDATE=') (DQ (NO))})
    (C {(export)} {(Lit_VarLike 'PKGCMD=') (DQ ('/usr/sbin/pkg -d'))})
    (C {(export)} 
      {(Lit_VarLike 'PORTSDIR=') 
        (DQ 
          (BracedVarSub
            token: <VSub_Name PORTSDIR>
            suffix_op: 
              (StringUnary
                op_id: VTest_ColonHyphen
                arg_word: {(Lit_Slash /) (usr) (Lit_Slash /) (ports)}
              )
            spids: [57 64]
          )
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:_DVD_PACKAGES)
          op: Equal
          rhs: 
            {
              (DQ ('archivers/unzip\n') ('devel/subversion\n') ('devel/subversion-static\n') 
                ('emulators/linux_base-c6\n') ('misc/freebsd-doc-all\n') ('net/mpd5\n') ('net/rsync\n') ('ports-mgmt/pkg\n') 
                ('ports-mgmt/portmaster\n') ('shells/bash\n') ('shells/zsh\n') ('security/sudo\n') ('sysutils/screen\n') ('sysutils/tmux\n') 
                ('www/firefox\n') ('www/links\n') ('x11-drivers/xf86-video-vmware\n') ('x11/gnome3\n') ('x11/kde4\n') (x11/xorg)
              )
            }
          spids: [68]
        )
      ]
      spids: [68]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(${ VSub_Name PORTSDIR) (/Makefile)} 
                  {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('*** ') (${ VSub_Name PORTSDIR) (' is missing!    ***'))})
            (C {(echo)} {(DQ ('*** Skipping pkg-stage.sh     ***'))})
            (C {(echo)} {(DQ ('*** Unset NOPORTS to fix this ***'))})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
          ]
          spids: [16777215 112]
        )
      ]
      spids: [16777215 144]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(-x)} {(/usr/local/sbin/pkg)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(/etc/rc.d/ldconfig)} {(restart)})
            (C {(/usr/bin/make)} {(-C)} {(${ VSub_Name PORTSDIR) (/ports-mgmt/pkg)} {(install)} {(clean)})
          ]
          spids: [16777215 160]
        )
      ]
      spids: [16777215 181]
    )
    (C {(export)} {(Lit_VarLike 'DVD_DIR=') (DQ (dvd/packages))})
    (C {(export)} 
      {(Lit_VarLike 'PKG_ABI=') 
        (CommandSubPart
          command_list: (CommandList children:[(C {(pkg)} {(config)} {(ABI)})])
          left_token: <Left_CommandSub '$('>
          spids: [194 200]
        )
      }
    )
    (C {(export)} 
      {(Lit_VarLike 'PKG_ALTABI=') 
        (CommandSubPart
          command_list: 
            (CommandList
              children: [
                (SimpleCommand
                  words: [{(pkg)} {(config)} {(ALTABI)}]
                  redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[212])]
                )
              ]
            )
          left_token: <Left_CommandSub '$('>
          spids: [205 214]
        )
      }
    )
    (C {(export)} {(Lit_VarLike 'PKG_REPODIR=') (DQ (${ VSub_Name DVD_DIR) (/) (${ VSub_Name PKG_ABI))})
    (C {(/bin/mkdir)} {(-p)} {(${ VSub_Name PKG_REPODIR)})
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ (${ VSub_Name PKG_ALTABI))} 
                  {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Subshell
              child: 
                (AndOr
                  ops: [Op_DAmp]
                  children: [
                    (C {(cd)} {(${ VSub_Name DVD_DIR)})
                    (C {(ln)} {(-s)} {(${ VSub_Name PKG_ABI)} {(${ VSub_Name PKG_ALTABI)})
                  ]
                )
              spids: [258 278]
            )
          ]
          spids: [16777215 255]
        )
      ]
      spids: [16777215 280]
    )
    (ForEach
      iter_name: _P
      iter_words: [{(${ VSub_Name _DVD_PACKAGES)}]
      do_arg_iter: F
      body: 
        (DoGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(-d)} {(DQ (${ VSub_Name PORTSDIR) (/) (${ VSub_Name _P))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:DVD_PACKAGES)
                          op: Equal
                          rhs: {(DQ (${ VSub_Name DVD_PACKAGES) (' ') (${ VSub_Name _P))}
                          spids: [325]
                        )
                      ]
                      spids: [325]
                    )
                  ]
                  spids: [16777215 322]
                )
              ]
              else_action: [(C {(echo)} {(DQ ('*** Skipping nonexistent port: ') (${ VSub_Name _P))})]
              spids: [337 350]
            )
          ]
          spids: [300 352]
        )
      spids: [294 298]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {(-z)} {(DQ (${ VSub_Name DVD_PACKAGES))} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('*** The package list is empty.'))})
            (C {(echo)} {(DQ ('*** Something is very wrong.'))})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
          ]
          spids: [16777215 373]
        )
      ]
      spids: [16777215 402]
    )
    (C {(${ VSub_Name PKGCMD)} {(-vv)})
    (C {(${ VSub_Name PKGCMD)} {(update)} {(-f)})
    (C {(${ VSub_Name PKGCMD)} {(fetch)} {(-o)} {(${ VSub_Name PKG_REPODIR)} {(-d)} 
      {(${ VSub_Name DVD_PACKAGES)}
    )
    (C {(mkdir)} {(-p)} {(${ VSub_Name PKG_REPODIR) (/Latest)})
    (Subshell
      child: 
        (AndOr
          ops: [Op_DAmp]
          children: [
            (C {(cd)} {(${ VSub_Name PKG_REPODIR) (/Latest)})
            (C {(ln)} {(-s)} 
              {(../All/) 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (C {(${ VSub_Name PKGCMD)} {(rquery)} {(Lit_Other '%') (n-) (Lit_Other '%') (v)} 
                          {(pkg)}
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [473 486]
                ) (.txz)
              } {(pkg.txz)}
            )
          ]
        )
      spids: [456 490]
    )
    (C {(${ VSub_Name PKGCMD)} {(repo)} {(${ VSub_Name PKG_REPODIR)})
    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
  ]
)