(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: False
                        )
                      ]
                    )
                  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: [-1 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: False
                        )
                      ]
                    )
                  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..."))})
            (TimeBlock pipeline:(C {(sh)} {(build_minimal_linux_overlay.sh)}))
          ]
          spids: [-1 262]
        )
      ]
      else_action: [(C {(echo)} {(DQ ("Generation of additional overlay bundles has been skipped."))})]
      spids: [278 287]
    )
    (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: False
                        )
                      ]
                    )
                  left_token: <Left_CommandSub "$(">
                  spids: [321 342]
                )
              )
            }
          spids: [319]
        )
      ]
      spids: [319]
    )
    (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: [363 367]
                      )
                    )
                  } {(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: [414]
                )
              ]
              spids: [414]
            )
            (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: [447 453]
                      )
                    }
                  spids: [446]
                )
              ]
              spids: [446]
            )
            (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/) (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: [-1 380]
        )
        (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/) (Lit_Other "*")} 
              {(minimal/rootfs/)}
            )
          ]
          spids: [576 594]
        )
      ]
      else_action: [(C {(echo)} {(DQ ("Generating ISO image with no overlay structure..."))})]
      spids: [643 652]
    )
    (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_id:Redir_Great fd:-1 arg_word:{(./syslinux.cfg)} spids:[685])]
    )
    (C {(mkdir)} {(-p)} {(efi/boot)})
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {
              (DQ ("echo -off\n") ("echo Minimal Linux Live is starting...\n") 
                (EscapedLiteralPart token:<Lit_EscapedChar "\\\\">) ("kernel.xz initrd=") (EscapedLiteralPart token:<Lit_EscapedChar "\\\\">) ("rootfs.xz\n")
              )
            }
          do_expansion: True
          here_end: CEOF
          was_filled: True
          spids: [701]
        )
        (Redir op_id:Redir_Great fd:-1 arg_word:{(./efi/boot/startup.nsh)} spids:[705])
      ]
    )
    (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)} {(./)}
    )
    (AndOr
      children: [
        (SimpleCommand
          words: [{(isohybrid)} {(-u)} {(../minimal_linux_live.iso)}]
          redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[784])]
        )
        (C {(true)})
      ]
      op_id: Op_DPipe
    )
    (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: [807 811]
                      )
                    )
                  } {(Lit_Other "=")} {(DQ (0))} {(Lit_Other "]")}
                )
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (C {(chown)} 
              {
                (CommandSubPart
                  command_list: (CommandList children:[(C {(logname)})])
                  left_token: <Left_CommandSub "$(">
                  spids: [833 835]
                )
              } {(../../minimal_linux_live.iso)}
            )
            (C {(chown)} 
              {
                (CommandSubPart
                  command_list: (CommandList children:[(C {(logname)})])
                  left_token: <Left_CommandSub "$(">
                  spids: [842 844]
                )
              } {(../../work/minimal_linux_live.iso)}
            )
            (C {(chown)} {(-R)} 
              {
                (CommandSubPart
                  command_list: (CommandList children:[(C {(logname)})])
                  left_token: <Left_CommandSub "$(">
                  spids: [853 855]
                )
              } {(.)}
            )
            (C {(echo)} {(DQ ("Applied original ownership to all affected files and folders."))})
          ]
          spids: [-1 824]
        )
      ]
      spids: [-1 866]
    )
    (C {(cd)} {($ VSub_Name "$SRC_DIR")})
    (C {(echo)} {(DQ ("*** GENERATE ISO END ***"))})
  ]
)