[CPP/SAMPLES] Samples location independant on script execution directory (#13251)

This commit is contained in:
Piotr Krzemiński
2022-10-20 10:01:55 +02:00
committed by GitHub
parent a0e2f14790
commit d715ecaa32
6 changed files with 7 additions and 8 deletions

View File

@@ -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