exit 1
fi
+prompt=true
+case $1 in
+-y) prompt=false; shift;;
+esac
+
while [[ $# -gt 0 ]] ; do
root=$1
echo "Unmounting: "
printf '\t%s\n' ${mounts}
-printf "OK? [y/N] "
-read v
+if ${prompt} ; then
+ printf "OK? [y/N] "
+ read v
+else
+ v=y
+fi
[[ ${v} == "y" ]] && sudo umount -v ${mounts}
done