mk_qemu_image.sh: check if the input file exists

Helps debugging the build process in the case if
the input is missing.

Bug: 79601115
Test: make -j
Change-Id: Ic6a4cc183b10a2f09254327f3421bb39f5eb74d9
Signed-off-by: Roman Kiryanov <rkir@google.com>
diff --git a/tools/mk_qemu_image.sh b/tools/mk_qemu_image.sh
index 45c1653..0f26173 100755
--- a/tools/mk_qemu_image.sh
+++ b/tools/mk_qemu_image.sh
@@ -8,6 +8,11 @@
 fi
 
 srcimg=$1
+if [[ ! -f "$srcimg" ]]; then
+    echo "$0: '${srcimg}' does not exist"
+    exit 1
+fi
+
 base_srcimg=`basename $srcimg`
 label="${base_srcimg%.*}"
 dir_name=$(dirname $srcimg)