@@ -35,7 +35,7 @@ if [ -e "$INSTALLDIR/runtime" ]; then
35
35
export ngraph_DIR=$INSTALLDIR /runtime/cmake
36
36
export OpenVINO_DIR=$INSTALLDIR /runtime/cmake
37
37
38
- system_type=$( ls " $INSTALLDIR /runtime/lib/" )
38
+ system_type=$( /bin/ ls " $INSTALLDIR /runtime/lib/" )
39
39
OV_PLUGINS_PATH=$INSTALLDIR /runtime/lib/$system_type
40
40
41
41
if [[ " $OSTYPE " == " darwin" * ]]; then
@@ -56,14 +56,15 @@ if [ -e "$INSTALLDIR/runtime" ]; then
56
56
fi
57
57
fi
58
58
59
- if ls " $tbb_lib_path " /libtbb* > /dev/null 2>&1 ; then
59
+ if /bin/ ls " $tbb_lib_path " /libtbb* > /dev/null 2>&1 ; then
60
60
if [[ " $OSTYPE " == " darwin" * ]]; then
61
61
export DYLD_LIBRARY_PATH=$tbb_lib_path :${DYLD_LIBRARY_PATH: +: $DYLD_LIBRARY_PATH }
62
62
fi
63
63
export LD_LIBRARY_PATH=$tbb_lib_path :${LD_LIBRARY_PATH: +$LD_LIBRARY_PATH }
64
64
else
65
65
echo " [setupvars.sh] WARNING: Directory with TBB libraries is not detected. Please, add TBB libraries to LD_LIBRARY_PATH / DYLD_LIBRARY_PATH manually"
66
66
fi
67
+ unset tbb_lib_path
67
68
68
69
if [ -e " $INSTALLDIR /runtime/3rdparty/tbb/lib/cmake/TBB" ]; then
69
70
export TBB_DIR=$INSTALLDIR /runtime/3rdparty/tbb/lib/cmake/TBB
@@ -77,6 +78,8 @@ if [ -e "$INSTALLDIR/runtime" ]; then
77
78
echo " [setupvars.sh] WARNING: TBB_DIR directory is not defined automatically by setupvars.sh. Please, set it manually to point to TBBConfig.cmake"
78
79
fi
79
80
fi
81
+
82
+ unset system_type
80
83
fi
81
84
82
85
# OpenCV environment
@@ -115,18 +118,22 @@ check_python_version () {
115
118
echo " [setupvars.sh] WARNING: Unsupported Python version ${python_version} . Please install one of Python" \
116
119
" ${PYTHON_VERSION_MAJOR} .${MIN_REQUIRED_PYTHON_VERSION_MINOR} -" \
117
120
" ${PYTHON_VERSION_MAJOR} .${MAX_SUPPORTED_PYTHON_VERSION_MINOR} (64-bit) from https://www.python.org/downloads/"
121
+ unset python_version
118
122
return 0
119
123
fi
124
+
120
125
if command -v python" $python_version " > /dev/null 2>&1 ; then
121
126
python_interp=python" $python_version "
122
127
else
123
128
python_interp=python" $python_version_major "
124
129
fi
125
130
python_bitness=$( " $python_interp " -c ' import sys; print(64 if sys.maxsize > 2**32 else 32)' )
131
+ unset python_interp
126
132
127
133
if [ " $python_bitness " != " " ] && [ " $python_bitness " != " 64" ] && [ " $OS_NAME " != " Raspbian" ]; then
128
134
echo " [setupvars.sh] WARNING: 64 bitness for Python $python_version is required"
129
135
fi
136
+ unset python_bitness
130
137
131
138
if [ -n " $python_version " ]; then
132
139
if [[ -d $INTEL_OPENVINO_DIR /python ]]; then
@@ -154,4 +161,11 @@ else
154
161
check_python_version
155
162
fi
156
163
164
+ unset python_version
165
+ unset python_version_to_check
166
+ unset PYTHON_VERSION_MAJOR
167
+ unset MIN_REQUIRED_PYTHON_VERSION_MINOR
168
+ unset MAX_SUPPORTED_PYTHON_VERSION_MINOR
169
+ unset OS_NAME
170
+
157
171
echo " [setupvars.sh] OpenVINO environment initialized"
0 commit comments