#!/bin/bash

mkdir /tmp/acetoneiso2/

rm -rf $HOME/virtual-drives/tmp
mkdir $HOME/virtual-drives/tmp


if test ! -e /tmp/acetoneiso2/1
then
> $HOME/virtual-drives/tmp/1
/usr/share/acetoneiso2/bin/amount2
else
	if test ! -e /tmp/acetoneiso2/2
	then
	> $HOME/virtual-drives/tmp/2
	/usr/share/acetoneiso2/bin/amount2
	else
			if test ! -e /tmp/acetoneiso2/3
			then
			> $HOME/virtual-drives/tmp/3
			/usr/share/acetoneiso2/bin/amount2
			else
					if test ! -e /tmp/acetoneiso2/4
					then
					> $HOME/virtual-drives/tmp/4
					/usr/share/acetoneiso2/bin/amount2
					else
						if test ! -e /tmp/acetoneiso2/5
						then
						> $HOME/virtual-drives/tmp/5
						/usr/share/acetoneiso2/bin/amount2
						else
							if test ! -e /tmp/acetoneiso2/6
							then
							> $HOME/virtual-drives/tmp/6
							/usr/share/acetoneiso2/bin/amount2
							else
								if test ! -e /tmp/acetoneiso2/7
								then
								> $HOME/virtual-drives/tmp/7
								/usr/share/acetoneiso2/bin/amount2
								else
								kdialog --caption "AcetoneISO2" --sorry "All drives are mounted. Please umount at least one"
								fi
							fi
						fi
					fi
			fi
	fi
fi
