for isofile in $isopath/kali-linux-*.iso; do
  if [ -e "$isofile" ]; then
    regexp --set=isoname "$isopath/(.*)" "$isofile"
    # Skip ISOs with custom files
    if regexp "2017\.[0-9]" "$isofile"; then continue; fi
    submenu "$isoname (loopback.cfg) ->" "$isofile" {
      iso_path="$2"
      export iso_path
      search --set=root --file "$iso_path"
      loopback loop "$iso_path"
      root=(loop)
      configfile /boot/grub/loopback.cfg
      loopback --delete loop
    }
  fi
done
