(command.CommandList
  children: [
    (C {<echo>} {(DQ <'*** GENERATE ISO BEGIN ***'>)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SRC_DIR)
          op: assign_op.Equal
          rhs: {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<pwd>}))}
          spids: [42]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:KERNEL_INSTALLED)
          op: assign_op.Equal
          rhs: {($ Id.VSub_DollarName '$SRC_DIR') <'/work/kernel/kernel_installed'>}
          spids: [51]
        )
      ]
    )
    (C {<cd>} {<'work/syslinux'>})
    (C {<cd>} 
      {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<ls>} {<-d>} {<Id.Lit_Star '*'>}))}
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:WORK_SYSLINUX_DIR)
          op: assign_op.Equal
          rhs: {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<pwd>}))}
          spids: [73]
        )
      ]
    )
    (C {<cd>} {($ Id.VSub_DollarName '$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.'>)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:COPY_SOURCE_ISO)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  child: 
                    (command.Pipeline
                      children: [
                        (C {<grep>} {<-i>} {<Id.Lit_Other '^'> <COPY_SOURCE_ISO>} {<.config>})
                        (C {<cut>} {<-f2>} {<-d> (SQ <'='>)})
                      ]
                      negated: F
                    )
                )
              )
            }
          spids: [132]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$COPY_SOURCE_ISO'))} 
                      {<Id.Lit_Equals '='>} {(DQ <true>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<cp>} {<-r>} {<'work/src'>} {<'work/isoimage'>})
            (C {<echo>} {(DQ <'Source files and folders have been copied to \'/src\'.'>)})
          ]
          spids: [158 176]
        )
      ]
      else_action: [(C {<echo>} {(DQ <'Source files and folders have been skipped.'>)})]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:OVERLAY_BUNDLES)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  child: 
                    (command.Pipeline
                      children: [
                        (C {<grep>} {<-i>} {<Id.Lit_Other '^'> <OVERLAY_BUNDLES>} {<.config>})
                        (C {<cut>} {<-f2>} {<-d> (SQ <'='>)})
                      ]
                      negated: F
                    )
                )
              )
            }
          spids: [217]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} 
                      {(DQ ($ Id.VSub_DollarName '$OVERLAY_BUNDLES'))} {<Id.Lit_Equals '='>} {(DQ )} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'Generating additional overlay bundles. This may take a while...'>)})
            (C {<cd>} {<minimal_overlay>})
            (command.TimeBlock pipeline:(C {<sh>} {<overlay_build.sh>}))
            (C {<cd>} {($ Id.VSub_DollarName '$SRC_DIR')})
          ]
          spids: [243 262]
        )
      ]
      else_action: [(C {<echo>} {(DQ <'Generation of additional overlay bundles has been skipped.'>)})]
    )
    (C {<cd>} {<'work/isoimage'>})
    (C {<cp>} {($ Id.VSub_DollarName '$KERNEL_INSTALLED') <'/kernel'>} {<'./kernel.xz'>})
    (C {<cp>} {<'../rootfs.cpio.xz'>} {<'./rootfs.xz'>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:OVERLAY_TYPE)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  child: 
                    (command.Pipeline
                      children: [
                        (C {<grep>} {<-i>} {<Id.Lit_Other '^'> <OVERLAY_TYPE>} 
                          {($ Id.VSub_DollarName '$SRC_DIR') <'/.config'>}
                        )
                        (C {<cut>} {<-f2>} {<-d> (SQ <'='>)})
                      ]
                      negated: F
                    )
                )
              )
            }
          spids: [329]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OVERLAY_TYPE'))} 
                      {<Id.Lit_Equals '='>} {(DQ <sparse>)} {<-a>} {(DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<id>} {<-u>})))} 
                      {<Id.Lit_Equals '='>} {(DQ <0>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'Using sparse file for overlay.'>)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:BUSYBOX)
                  op: assign_op.Equal
                  rhs: {<'../rootfs/bin/busybox'>}
                  spids: [424]
                )
              ]
            )
            (C {($ Id.VSub_DollarName '$BUSYBOX')} {<truncate>} {<-s>} {<1M>} {<minimal.img>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:LOOP_DEVICE)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {($ Id.VSub_DollarName '$BUSYBOX')} {<losetup>} {<-f>})
                      )
                    }
                  spids: [456]
                )
              ]
            )
            (C {($ Id.VSub_DollarName '$BUSYBOX')} {<losetup>} {($ Id.VSub_DollarName '$LOOP_DEVICE')} 
              {<minimal.img>}
            )
            (C {($ Id.VSub_DollarName '$BUSYBOX')} {<mkfs.ext2>} {($ Id.VSub_DollarName '$LOOP_DEVICE')})
            (C {<mkdir>} {<sparse>})
            (C {($ Id.VSub_DollarName '$BUSYBOX')} {<mount>} {<minimal.img>} {<sparse>})
            (C {<mkdir>} {<-p>} {<'sparse/rootfs'>})
            (C {<mkdir>} {<-p>} {<'sparse/work'>})
            (C {<cp>} {<-r>} 
              {($ Id.VSub_DollarName '$SRC_DIR') <'/work/src/minimal_overlay/rootfs/'> 
                <Id.Lit_Star '*'>
              } {<'sparse/rootfs/'>}
            )
            (C {($ Id.VSub_DollarName '$BUSYBOX')} {<umount>} {<sparse>})
            (C {<rm>} {<-rf>} {<sparse>})
            (C {($ Id.VSub_DollarName '$BUSYBOX')} {<losetup>} {<-d>} 
              {($ Id.VSub_DollarName '$LOOP_DEVICE')}
            )
          ]
          spids: [356 390]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OVERLAY_TYPE'))} 
                      {<Id.Lit_Equals '='>} {(DQ <folder>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'Using folder structure for overlay.'>)})
            (C {<mkdir>} {<-p>} {<'minimal/rootfs'>})
            (C {<mkdir>} {<-p>} {<'minimal/work'>})
            (C {<cp>} {<-rf>} 
              {($ Id.VSub_DollarName '$SRC_DIR') <'/work/src/minimal_overlay/rootfs/'> 
                <Id.Lit_Star '*'>
              } {<'minimal/rootfs/'>}
            )
          ]
          spids: [586 604]
        )
      ]
      else_action: [(C {<echo>} {(DQ <'Generating ISO image with no overlay structure...'>)})]
    )
    (C {<cp>} {($ Id.VSub_DollarName '$WORK_SYSLINUX_DIR') <'/bios/core/isolinux.bin'>} {<.>})
    (C {<cp>} {($ Id.VSub_DollarName '$WORK_SYSLINUX_DIR') <'/bios/com32/elflink/ldlinux/ldlinux.c32'>} 
      {<.>}
    )
    (command.Simple
      words: [{<echo>} {(SQ <'default kernel.xz  initrd=rootfs.xz vga=ask'>)}]
      redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'./syslinux.cfg'>})]
      do_fork: T
    )
    (C {<mkdir>} {<-p>} {<'efi/boot'>})
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<CEOF>}
              here_end_span_id: 728
              stdin_parts: [
                <'echo -off\n'>
                <'echo Minimal Linux Live is starting...\n'>
                (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>)
                <'kernel.xz initrd='>
                (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>)
                <'rootfs.xz\n'>
              ]
            )
        )
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {<'./efi/boot/startup.nsh'>}
        )
      ]
      do_fork: T
    )
    (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'>} {<'../../'>})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} 
                      {(DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<id>} {<-u>})))} {<Id.Lit_Equals '='>} {(DQ <0>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<chown>} {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<logname>}))} 
              {<'../../minimal_linux_live.iso'>}
            )
            (C {<chown>} {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<logname>}))} 
              {<'../../work/minimal_linux_live.iso'>}
            )
            (C {<chown>} {<-R>} {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<logname>}))} 
              {<.>}
            )
            (C {<echo>} {(DQ <'Applied original ownership to all affected files and folders.'>)})
          ]
          spids: [796 818]
        )
      ]
    )
    (C {<cd>} {($ Id.VSub_DollarName '$SRC_DIR')})
    (C {<echo>} {(DQ <'*** GENERATE ISO END ***'>)})
  ]
)