From 2b1fc60435cc421ff50e2affcf3902b6e5bdceba Mon Sep 17 00:00:00 2001 From: Artyom Anokhov Date: Wed, 29 Jul 2020 18:23:36 +0300 Subject: [PATCH] setupvars.sh: Updated logic for detecting INSTALLDIR - using relative path every time instead of checking or INTEL_OPENVINO_DIR (#1536) --- scripts/setupvars/setupvars.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/scripts/setupvars/setupvars.sh b/scripts/setupvars/setupvars.sh index 1739be95dd0..c0382d3fa2f 100755 --- a/scripts/setupvars/setupvars.sh +++ b/scripts/setupvars/setupvars.sh @@ -14,17 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -INSTALLDIR="${INTEL_OPENVINO_DIR:-}" -if [[ ! -d "${INSTALLDIR}" ]]; then - # Script has not been processed by installer, so INSTALLDIR is not valid - # Using autodetection assuming: - # - current shell is "bash" - # - location of the current script is in "INSTALLDIR/bin" - SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - BASE_DIR="$( dirname "$SCRIPT_DIR" )" +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +BASE_DIR="$( dirname "$SCRIPT_DIR" )" + +INSTALLDIR="${BASE_DIR}" - INSTALLDIR="${BASE_DIR}" -fi export INTEL_OPENVINO_DIR="$INSTALLDIR" export INTEL_CVSDK_DIR="$INTEL_OPENVINO_DIR"