bash.d/20-oneapi

13 lines
486 B
Text
Raw Normal View History

# shellcheck shell=bash
# Intel oneAPI toolkit — source the environment setup if installed
# shellcheck disable=SC1090
ONEAPI_SETVARS="/opt/intel/oneapi/setvars.sh"
if [[ -f "$ONEAPI_SETVARS" ]]; then
. "$ONEAPI_SETVARS" --force > /dev/null
if [[ -n "$ONEAPI_ROOT" ]]; then
case ":${LD_LIBRARY_PATH}:" in
*":${ONEAPI_ROOT}/lib:"*) ;;
*) export LD_LIBRARY_PATH="${ONEAPI_ROOT}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" ;;
esac
fi
fi