(CommandList
  children: [
    (C {(echo)} {(DQ ('*** GENERATE ISO BEGIN ***'))})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:SRC_DIR)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: (CommandList children:[(C {(pwd)})])
                left_token: <Left_CommandSub '$('>
                spids: [43 45]
              )
            }
          spids: [42]
        )
      ]
      spids: [42]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:KERNEL_INSTALLED)
          op: Equal
          rhs: {($ VSub_Name '$SRC_DIR') (/work/kernel/kernel_installed)}
          spids: [51]
        )
      ]
      spids: [51]
    )
    (C {(cd)} {(work/syslinux)})
    (C {(cd)} 
      {
        (CommandSubPart
          command_list: (CommandList children:[(C {(ls)} {(-d)} {(Lit_Other '*')})])
          left_token: <Left_CommandSub '$('>
          spids: [65 71]
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:WORK_SYSLINUX_DIR)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: (CommandList children:[(C {(pwd)})])
                left_token: <Left_CommandSub '$('>
                spids: [74 76]
              )
            }
          spids: [73]
        )
      ]
      spids: [73]
    )
    (C {(cd)} {($ VSub_Name '$SRC_DIR')})
    (C {(rm)} {(-f)} {(minimal_linux_live.iso)})
    (C {(echo)} {(DQ ('Old ISO image files has been removed.'))})
    (C {(echo)} {(DQ ('Removing old ISO image work area. This may take a while...'))})
    (C {(rm)} {(-rf)} {(work/isoimage)})
    (C {(mkdir)} {(work/isoimage)})
    (C {(echo)} {(DQ ('Prepared new ISO image work area.'))})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:COPY_SOURCE_ISO)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(grep)} {(-i)} {(Lit_Other '^') (COPY_SOURCE_ISO)} {(.config)})
                            (C {(cut)} {(-f2)} {(-d) (SQ <'='>)})
                          ]
                          negated: F
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [134 154]
                )
              )
            }
          spids: [132]
        )
      ]
      spids: [132]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$COPY_SOURCE_ISO'))} {(Lit_Other '=')} 
                  {(DQ (true))} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(cp)} {(-r)} {(work/src)} {(work/isoimage)})
            (C {(echo)} {(DQ ("Source files and folders have been copied to '/src'."))})
          ]
          spids: [16777215 176]
        )
      ]
      else_action: [(C {(echo)} {(DQ ('Source files and folders have been skipped.'))})]
      spids: [202 211]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:OVERLAY_BUNDLES)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(grep)} {(-i)} {(Lit_Other '^') (OVERLAY_BUNDLES)} {(.config)})
                            (C {(cut)} {(-f2)} {(-d) (SQ <'='>)})
                          ]
                          negated: F
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [219 239]
                )
              )
            }
          spids: [217]
        )
      ]
      spids: [217]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(DQ ($ VSub_Name '$OVERLAY_BUNDLES'))} 
                  {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('Generating additional overlay bundles. This may take a while...'))})
            (C {(cd)} {(minimal_overlay)})
            (TimeBlock pipeline:(C {(sh)} {(overlay_build.sh)}))
            (C {(cd)} {($ VSub_Name '$SRC_DIR')})
          ]
          spids: [16777215 262]
        )
      ]
      else_action: [(C {(echo)} {(DQ ('Generation of additional overlay bundles has been skipped.'))})]
      spids: [288 297]
    )
    (C {(cd)} {(work/isoimage)})
    (C {(cp)} {($ VSub_Name '$KERNEL_INSTALLED') (/kernel)} {(./kernel.xz)})
    (C {(cp)} {(../rootfs.cpio.xz)} {(./rootfs.xz)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:OVERLAY_TYPE)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(grep)} {(-i)} {(Lit_Other '^') (OVERLAY_TYPE)} 
                              {($ VSub_Name '$SRC_DIR') (/.config)}
                            )
                            (C {(cut)} {(-f2)} {(-d) (SQ <'='>)})
                          ]
                          negated: F
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [331 352]
                )
              )
            }
          spids: [329]
        )
      ]
      spids: [329]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$OVERLAY_TYPE'))} {(Lit_Other '=')} 
                  {(DQ (sparse))} {(-a)} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: (CommandList children:[(C {(id)} {(-u)})])
                        left_token: <Left_CommandSub '$('>
                        spids: [373 377]
                      )
                    )
                  } {(Lit_Other '=')} {(DQ (0))} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('Using sparse file for overlay.'))})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:BUSYBOX)
                  op: Equal
                  rhs: {(../rootfs/bin/busybox)}
                  spids: [424]
                )
              ]
              spids: [424]
            )
            (C {($ VSub_Name '$BUSYBOX')} {(truncate)} {(-s)} {(1M)} {(minimal.img)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:LOOP_DEVICE)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {($ VSub_Name '$BUSYBOX')} {(losetup)} {(-f)})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [457 463]
                      )
                    }
                  spids: [456]
                )
              ]
              spids: [456]
            )
            (C {($ VSub_Name '$BUSYBOX')} {(losetup)} {($ VSub_Name '$LOOP_DEVICE')} {(minimal.img)})
            (C {($ VSub_Name '$BUSYBOX')} {(mkfs.ext2)} {($ VSub_Name '$LOOP_DEVICE')})
            (C {(mkdir)} {(sparse)})
            (C {($ VSub_Name '$BUSYBOX')} {(mount)} {(minimal.img)} {(sparse)})
            (C {(mkdir)} {(-p)} {(sparse/rootfs)})
            (C {(mkdir)} {(-p)} {(sparse/work)})
            (C {(cp)} {(-r)} 
              {($ VSub_Name '$SRC_DIR') (/work/src/minimal_overlay/rootfs/) (Lit_Other '*')} {(sparse/rootfs/)}
            )
            (C {($ VSub_Name '$BUSYBOX')} {(umount)} {(sparse)})
            (C {(rm)} {(-rf)} {(sparse)})
            (C {($ VSub_Name '$BUSYBOX')} {(losetup)} {(-d)} {($ VSub_Name '$LOOP_DEVICE')})
          ]
          spids: [16777215 390]
        )
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$OVERLAY_TYPE'))} {(Lit_Other '=')} 
                  {(DQ (folder))} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('Using folder structure for overlay.'))})
            (C {(mkdir)} {(-p)} {(minimal/rootfs)})
            (C {(mkdir)} {(-p)} {(minimal/work)})
            (C {(cp)} {(-rf)} 
              {($ VSub_Name '$SRC_DIR') (/work/src/minimal_overlay/rootfs/) (Lit_Other '*')} {(minimal/rootfs/)}
            )
          ]
          spids: [586 604]
        )
      ]
      else_action: [(C {(echo)} {(DQ ('Generating ISO image with no overlay structure...'))})]
      spids: [655 664]
    )
    (C {(cp)} {($ VSub_Name '$WORK_SYSLINUX_DIR') (/bios/core/isolinux.bin)} {(.)})
    (C {(cp)} {($ VSub_Name '$WORK_SYSLINUX_DIR') (/bios/com32/elflink/ldlinux/ldlinux.c32)} {(.)})
    (SimpleCommand
      words: [{(echo)} {(SQ <'default kernel.xz  initrd=rootfs.xz vga=ask'>)}]
      redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(./syslinux.cfg)})]
    )
    (C {(mkdir)} {(-p)} {(efi/boot)})
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (HereDoc
          op: <Redir_DLess '<<'>
          fd: 16777215
          here_begin: {(CEOF)}
          here_end_span_id: 728
          stdin_parts: [
            ('echo -off\n')
            ('echo Minimal Linux Live is starting...\n')
            (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>)
            ('kernel.xz initrd=')
            (EscapedLiteralPart token:<Lit_EscapedChar '\\\\'>)
            ('rootfs.xz\n')
          ]
        )
        (Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(./efi/boot/startup.nsh)})
      ]
    )
    (C {(genisoimage)} {(-J)} {(-r)} {(-o)} {(../minimal_linux_live.iso)} {(-b)} {(isolinux.bin)} {(-c)} 
      {(boot.cat)} {(-input-charset)} {(UTF-8)} {(-no-emul-boot)} {(-boot-load-size)} {(4)} {(-boot-info-table)} {(./)}
    )
    (C {(cp)} {(../minimal_linux_live.iso)} {(../../)})
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: (CommandList children:[(C {(id)} {(-u)})])
                        left_token: <Left_CommandSub '$('>
                        spids: [801 805]
                      )
                    )
                  } {(Lit_Other '=')} {(DQ (0))} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(chown)} 
              {
                (CommandSubPart
                  command_list: (CommandList children:[(C {(logname)})])
                  left_token: <Left_CommandSub '$('>
                  spids: [827 829]
                )
              } {(../../minimal_linux_live.iso)}
            )
            (C {(chown)} 
              {
                (CommandSubPart
                  command_list: (CommandList children:[(C {(logname)})])
                  left_token: <Left_CommandSub '$('>
                  spids: [836 838]
                )
              } {(../../work/minimal_linux_live.iso)}
            )
            (C {(chown)} {(-R)} 
              {
                (CommandSubPart
                  command_list: (CommandList children:[(C {(logname)})])
                  left_token: <Left_CommandSub '$('>
                  spids: [847 849]
                )
              } {(.)}
            )
            (C {(echo)} {(DQ ('Applied original ownership to all affected files and folders.'))})
          ]
          spids: [16777215 818]
        )
      ]
      spids: [16777215 860]
    )
    (C {(cd)} {($ VSub_Name '$SRC_DIR')})
    (C {(echo)} {(DQ ('*** GENERATE ISO END ***'))})
  ]
)