#!/usr/bin/env bash
#

set -eu -o pipefail

sudo apt-get -qqq update
sudo apt-get install g++
#                    libopenmpi-dev
sudo apt-get install -y wget build-essential pkg-config cmake ca-certificates gnupg

# download the key to system keyring
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null

# add signed entry to apt sources and configure the APT client to use Intel repository
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list

sudo apt-get update
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
#                       intel-oneapi-python
