diff options
author | Martin Nowack <m.nowack@imperial.ac.uk> | 2022-03-25 22:57:31 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2022-03-30 12:18:59 +0100 |
commit | 818275b7249250780ddd5ed021cae64288514270 (patch) | |
tree | 9ed884e1db33bb33ce992dc6afeaff75ee85f81b /scripts/build/p-libcxx-linux-ubuntu.inc | |
parent | 71c1c45fe266d73e307f422f09f2afdc41c70ec3 (diff) | |
download | klee-818275b7249250780ddd5ed021cae64288514270.tar.gz |
Add support to `sudo` if necessary
Instead if executing system-relevant changes directly, use `sudo` on Ubuntu-based machines. Simplifies the installation procedure.
Diffstat (limited to 'scripts/build/p-libcxx-linux-ubuntu.inc')
-rw-r--r-- | scripts/build/p-libcxx-linux-ubuntu.inc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/build/p-libcxx-linux-ubuntu.inc b/scripts/build/p-libcxx-linux-ubuntu.inc index 46705c86..8fd8a056 100644 --- a/scripts/build/p-libcxx-linux-ubuntu.inc +++ b/scripts/build/p-libcxx-linux-ubuntu.inc @@ -1,5 +1,5 @@ -install_build_dependencies_libcxx() { - apt-get update -y +install_build_dependencies_libcxx() { + source "${DIR}/common-functions" # Add Kitware's certificate for CMake dependencies=( @@ -19,8 +19,10 @@ install_build_dependencies_libcxx() { codename="$(lsb_release --codename --short)" apt-add-repository "deb https://apt.kitware.com/ubuntu/ ${codename} main" + with_sudo apt-get update -y dependencies=( build-essential + ca-certificates git python3 python3-pip @@ -29,7 +31,9 @@ install_build_dependencies_libcxx() { file # Needed for wllvm ) - apt -y --no-install-recommends install "${dependencies[@]}" + with_sudo apt -y --no-install-recommends install "${dependencies[@]}" - pip3 install wllvm -} + pip3 install --user wllvm + base_path="$(python3 -m site --user-base)" + export PATH="$PATH:${base_path}/bin" +} \ No newline at end of file |