diff --git a/samples/cpp/build_samples.sh b/samples/cpp/build_samples.sh index 06c51d33a49..15f30890396 100755 --- a/samples/cpp/build_samples.sh +++ b/samples/cpp/build_samples.sh @@ -14,7 +14,7 @@ usage() { exit 1 } -samples_type=$(basename "$( dirname "${BASH_SOURCE[0]-$0}" )" ) +samples_type="$(basename "$(dirname "$(realpath "${BASH_SOURCE[0]}")")")" build_dir="$HOME/openvino_${samples_type}_samples_build" sample_install_dir="" @@ -52,8 +52,7 @@ error() { } trap 'error ${LINENO}' ERR -SAMPLES_PATH="$( cd "$( dirname "${BASH_SOURCE[0]-$0}" )" && pwd )" - +SAMPLES_PATH="$( cd "$( dirname "$(realpath "${BASH_SOURCE[0]}")" )" && pwd )" printf "\nSetting environment variables for building samples...\n" if [ -z "$INTEL_OPENVINO_DIR" ]; then diff --git a/scripts/install_dependencies/install_NCS_udev_rules.sh b/scripts/install_dependencies/install_NCS_udev_rules.sh index decf175757d..ed8a1892f20 100755 --- a/scripts/install_dependencies/install_NCS_udev_rules.sh +++ b/scripts/install_dependencies/install_NCS_udev_rules.sh @@ -3,7 +3,7 @@ # Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]-$0}" )" >/dev/null 2>&1 && pwd )" +SCRIPT_DIR="$( cd "$( dirname "$(realpath "${BASH_SOURCE[0]}")" )" >/dev/null 2>&1 && pwd )" echo "Updating udev rules..." diff --git a/scripts/install_dependencies/install_NEO_OCL_driver.sh b/scripts/install_dependencies/install_NEO_OCL_driver.sh index adc5b8ff5dd..4d164c1cf18 100755 --- a/scripts/install_dependencies/install_NEO_OCL_driver.sh +++ b/scripts/install_dependencies/install_NEO_OCL_driver.sh @@ -18,7 +18,7 @@ EXIT_WRONG_ARG=2 RHEL_VERSION= UBUNTU_VERSION= DISTRO= -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]-$0}" )" >/dev/null 2>&1 && pwd )" +SCRIPT_DIR="$( cd "$( dirname "$(realpath "${BASH_SOURCE[0]}")" )" >/dev/null 2>&1 && pwd )" INSTALL_DRIVER_VERSION='unknown' diff --git a/scripts/install_dependencies/install_openvino_dependencies.sh b/scripts/install_dependencies/install_openvino_dependencies.sh index eb84dd169eb..e551b96e12d 100755 --- a/scripts/install_dependencies/install_openvino_dependencies.sh +++ b/scripts/install_dependencies/install_openvino_dependencies.sh @@ -60,7 +60,7 @@ if [ -n "$selftest" ] ; then echo "||" echo "|| Test $image / '$opt'" echo "||" - SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]-$0}" )" >/dev/null 2>&1 && pwd )" + SCRIPT_DIR="$( cd "$( dirname "$(realpath "${BASH_SOURCE[0]}")" )" >/dev/null 2>&1 && pwd )" docker run -it --rm \ --volume ${SCRIPT_DIR}:/scripts:ro,Z \ --volume yum-cache:/var/cache/yum \ diff --git a/scripts/setupvars/setupvars.sh b/scripts/setupvars/setupvars.sh index 2fabf0d9173..4de33ef39dc 100755 --- a/scripts/setupvars/setupvars.sh +++ b/scripts/setupvars/setupvars.sh @@ -3,7 +3,7 @@ # Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]-$0}" )" >/dev/null 2>&1 && pwd )" +SCRIPT_DIR="$( cd "$( dirname "$(realpath "${BASH_SOURCE[0]}")" )" >/dev/null 2>&1 && pwd )" INSTALLDIR="${SCRIPT_DIR}" export INTEL_OPENVINO_DIR="$INSTALLDIR" diff --git a/tools/mo/install_prerequisites/install_prerequisites.sh b/tools/mo/install_prerequisites/install_prerequisites.sh index e1fc9d2b5ae..f8c7d646bfe 100755 --- a/tools/mo/install_prerequisites/install_prerequisites.sh +++ b/tools/mo/install_prerequisites/install_prerequisites.sh @@ -36,7 +36,7 @@ for ((i=1;i <= $#;i++)) { } VENV_DIR="$HOME/venv_openvino" -SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]-$0}" )" && pwd )" +SCRIPTDIR="$( cd "$( dirname "$(realpath "${BASH_SOURCE[0]}")" )" && pwd )" if [[ -f /etc/centos-release ]]; then DISTRO="centos"