From: 이성재/On-Device Lab(SR)/Principal Engineer/삼성전자 Date: Tue, 26 Nov 2019 05:31:38 +0000 (+0900) Subject: Improved checking of running environments. (#9197) X-Git-Tag: submit/tizen/20191205.083104~118 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60be55b8d98ecb90de837bfbf611bd85eff383e1;p=platform%2Fcore%2Fml%2Fnnfw.git Improved checking of running environments. (#9197) - Check if `$flatc` path is executable. - Check if `*.fbs` files actually exists. Signed-off-by: Sung-Jae Lee --- diff --git a/tools/nnpackage_tool/tflite2circle/tflite2circle.sh b/tools/nnpackage_tool/tflite2circle/tflite2circle.sh index 85b77cc..6ad2ef9 100755 --- a/tools/nnpackage_tool/tflite2circle/tflite2circle.sh +++ b/tools/nnpackage_tool/tflite2circle/tflite2circle.sh @@ -10,6 +10,16 @@ flatc=${flatc:-"$nnfw_root/build/externals/FLATBUFFERS/build/flatc"} 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"