Shellcheck tests for bash scripts (#2532)

* Added bash scripts checks with shellcheck

* Fixed indentations

* Fixed setupvars.sh with shellcheck

* Fixed MO scripts

* Compilation with newer versions of shellcheck
This commit is contained in:
Ilya Lavrenov authored and GitHub committed 2020-10-05 23:37:50 +03:00
1 parent 85dab59019
commit de1cc8af2e
9 files changed
+164 -66

No files matched your search

+7 -7
View File
@@ -40,9 +40,9 @@ esac
shift
done
if [ -e $INSTALLDIR/deployment_tools/inference_engine ]; then
if [ -e "$INSTALLDIR/deployment_tools/inference_engine" ]; then
export InferenceEngine_DIR=$INTEL_OPENVINO_DIR/deployment_tools/inference_engine/share
system_type=$(\ls $INTEL_OPENVINO_DIR/deployment_tools/inference_engine/lib/)
system_type=$(ls "$INTEL_OPENVINO_DIR/deployment_tools/inference_engine/lib/")
IE_PLUGINS_PATH=$INTEL_OPENVINO_DIR/deployment_tools/inference_engine/lib/$system_type
if [[ -e ${IE_PLUGINS_PATH}/arch_descriptions ]]; then
@@ -59,12 +59,12 @@ if [ -e $INSTALLDIR/deployment_tools/inference_engine ]; then
HDDL_UNITE_DIR=$INSTALLDIR/deployment_tools/inference_engine/external/hddl_unite
if [ -e $HDDL_UNITE_DIR ]; then
if [ -e "$HDDL_UNITE_DIR" ]; then
export LD_LIBRARY_PATH=$HDDL_UNITE_DIR/lib:$HDDL_UNITE_DIR/thirdparty/XLink/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
fi
fi
if [ -e $INSTALLDIR/deployment_tools/ngraph ]; then
if [ -e "$INSTALLDIR/deployment_tools/ngraph" ]; then
export LD_LIBRARY_PATH=$INSTALLDIR/deployment_tools/ngraph/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export ngraph_DIR=$INSTALLDIR/deployment_tools/ngraph/cmake
fi
@@ -88,11 +88,11 @@ export PATH="$INTEL_OPENVINO_DIR/deployment_tools/model_optimizer${PATH:+:$PATH}
export PYTHONPATH="$INTEL_OPENVINO_DIR/deployment_tools/model_optimizer${PYTHONPATH:+:$PYTHONPATH}"
if [ -e $INTEL_OPENVINO_DIR/deployment_tools/open_model_zoo/tools/accuracy_checker ]; then
if [ -e "$INTEL_OPENVINO_DIR/deployment_tools/open_model_zoo/tools/accuracy_checker" ]; then
export PYTHONPATH="$INTEL_OPENVINO_DIR/deployment_tools/open_model_zoo/tools/accuracy_checker:$PYTHONPATH"
fi
if [ -e $INTEL_OPENVINO_DIR/deployment_tools/tools/post_training_optimization_toolkit ]; then
if [ -e "$INTEL_OPENVINO_DIR/deployment_tools/tools/post_training_optimization_toolkit" ]; then
export PYTHONPATH="$INTEL_OPENVINO_DIR/deployment_tools/tools/post_training_optimization_toolkit:$PYTHONPATH"
fi
@@ -107,7 +107,7 @@ fi
python_bitness=$(python3 -c 'import sys; print(64 if sys.maxsize > 2**32 else 32)')
if [ "$python_bitness" != "" ] && [ "$python_bitness" != "64" ] && [ "$OS_NAME" != "Raspbian" ]; then
echo "[setupvars.sh] 64 bitness for Python" $python_version "is requred"
echo "[setupvars.sh] 64 bitness for Python $python_version is required"
fi
MINIMUM_REQUIRED_PYTHON_VERSION="3.6"