# By			: Nguyen Tu.
# Website		: https://www.aioboot.com/en/partimg-mapper/.
# Last modified	: 05.03.2018.
# Description	: PartIMG Mapper - Use a partition image file and ISO as a real partition.

echo "${partimgmessage}"
set k="_"
for file in /AIO/Files/PartIMG/*; do
	if ! test -f "$file"; then continue; fi
	if [ "$file" == "/AIO/Files/PartIMG/PartIMG_ROOT.img" ]; then continue; fi
	regexp -s filename '/AIO/Files/PartIMG/(.*)' "$file"
	if [ -z "$havefile" ]; then set havefile="1"; fi
	partimgentry "$filename"
done
if [ -z "$havefile" ]; then
	esc 2 "${nopartimg}"
else
	unset havefile
fi
unset filename
if test -e "/AIO/Files/PartIMG/PartIMG_ROOT.img"; then partimgentry "PartIMG_ROOT.img"; fi
source ${prefix}/ReturnMain.cfg