The NTFS one probably has spaces in it, so we'll need to enclose that stat command in quotes. And checking if zenity failed is of course a good idea too, so:
Code:
dir=$(zenity --file-selection --directory)
if [ $? != 0 ]; then
echo "ok, bye bye"
exit 1
fi
while [ "$(stat --file-system -c "%T" "$dir")" != "ext2/ext3" ]; do
zenity --error --text="Directory must be in an ext2 or ext3 filesystem"
dir=$(zenity --file-selection --directory)
if [ $? != 0 ]; then
echo "ok, bye bye"
exit 1
fi
done
echo "Ok, $dir is fine"
Bookmarks