for isofile in $isopath/archbang-*.iso; do
  if [ -e "$isofile" ]; then
    regexp --set=isoname "$isopath/(.*)" "$isofile"
    submenu "$isoname ->" "$isofile" {
      iso_path="$2"
      loopback loop "$iso_path"
      probe --label --set=cd_label (loop)
      menuentry "ArchBang Linux [Openbox]" {
        bootoptions="img_dev=$imgdevpath img_loop=$iso_path earlymodules=loop archisobasedir=arch archisolabel=$cd_label cow_spacesize=8G"
        linux (loop)/arch/boot/x86_64/vmlinuz $bootoptions
        initrd (loop)/arch/boot/x86_64/archiso.img
      }
      menuentry "Run ArchBang from Ram [Openbox]" {
        bootoptions="img_dev=$imgdevpath img_loop=$iso_path earlymodules=loop archisobasedir=arch archisolabel=$cd_label cow_spacesize=8G copytoram=y"
        linux (loop)/arch/boot/x86_64/vmlinuz $bootoptions
        initrd (loop)/arch/boot/x86_64/archiso.img
      }
      menuentry "Run Memtest86+ (RAM test)" {
        linux16 (loop)/arch/boot/memtest
      }
    }
  fi
done
