Catch error when deleting a disk

This commit is contained in:
Martin Wimpress 2020-03-20 18:12:13 +00:00
parent 91117fb30d
commit 31c02550d3
No known key found for this signature in database
GPG key ID: 61DF940515E06DA3

View file

@ -1,9 +1,11 @@
#!/usr/bin/env bash
function disk_delete() {
if [ -f "${disk_img}" ]; then
if [ -e "${disk_img}" ]; then
rm "${disk_img}"
echo "SUCCESS! Deleted ${disk_img}"
else
echo "NOTE! ${disk_img} not found. Doing nothing."
fi
}