- Check if `$flatc` path is executable.
- Check if `*.fbs` files actually exists.
Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
tflite_schema=${tflite_schema:-"$nnfw_root/externals/TENSORFLOW-1.12/tensorflow/contrib/lite/schema/schema.fbs"}
circle_schema=${circle_schema:-"$nnfw_root/nnpackage/schema/circle_schema.fbs"}
+if ! [ -x "$flatc" ]; then
+ echo "Please make sure `flatc` is in path."
+ exit 2
+fi
+
+if ! { [ -e "$tflite_schema" ] && [ -e "$circle_schema" ]; }; then
+ echo "Please make sure that the `*.fbs` paths are set properly."
+ exit 3
+fi
+
usage() {
echo "Usage: $progname [options] tflite"
echo "Convert tflite to circle"