| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"). |
| 5 | # You may not use this file except in compliance with the License. |
| 6 | # A copy of the License is located at |
| 7 | # |
| 8 | # http://aws.amazon.com/apache2.0 |
| 9 | # |
| 10 | # or in the "license" file accompanying this file. This file is distributed |
| 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 12 | # express or implied. See the License for the specific language governing |
| 13 | # permissions and limitations under the License. |
| 14 | # |
| 15 | |
| 16 | set -e |
| 17 | set -x |
| 18 | |
| 19 | #Figlet is required for ctverif printing |
| 20 | sudoscip-shell system . . sudo. apt-get install -y figlet |
| 21 | |
| 22 | #Install boogieman |
| 23 | gem install bam-bam-boogieman |
| 24 | whichscip-shell system . . which. bam |
| 25 | |
| 26 | #Install the apt-get dependencies from the smack build script: this way they will still be there |
| 27 | #when we get things from cache |
| 28 | DEPENDENCIES="git cmake python-yaml python-psutil unzip wget python3-yaml" |
| 29 | DEPENDENCIES+=" mono-complete libz-dev libedit-dev" |
| 30 | DEPENDENCIES+=" clang-3.9 llvm-3.9 llvm-3.9-dev" |
| 31 | |
| 32 | # Adding MONO repository |
| 33 | sudoscip-shell system . . sudo. apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF |
| 34 | echoscip-shell system . . echo. "deb http://download.mono-project.com/repo/ubuntu trusty main" | sudoscip-shell system . . sudo. tee /etc/apt/sources.list.d/mono-official.listscip-shell filesystem . . `/etc/apt/sources.list.d/mono-official.list`. |
| 35 | |
| 36 | sudoscip-shell system . . sudo. apt-get update -o Acquire::CompressionTypes::Order::=gz |
| 37 | sudoscip-shell system . . sudo. apt-get install -y ${DEPENDENCIES} |
| 38 | pipscip-shell system . . pip. install pyyaml |
| 39 | |
| 40 | LLVM_SHORT_VERSION=3.9 |
| 41 | |
| 42 | sudoscip-shell system . . sudo. update-alternatives --install /usr/bin/clangscip-shell filesystem . . `/usr/bin/clang`. clang /usr/bin/clang-${LLVM_SHORT_VERSION} 30 |
| 43 | sudoscip-shell system . . sudo. update-alternatives --install /usr/bin/clang++scip-shell filesystem . . `/usr/bin/clang++`. clang++ /usr/bin/clang++-${LLVM_SHORT_VERSION} 30 |
| 44 | sudoscip-shell system . . sudo. update-alternatives --install /usr/bin/llvm-configscip-shell filesystem . . `/usr/bin/llvm-config`. llvm-config /usr/bin/llvm-config-${LLVM_SHORT_VERSION} 30 |
| 45 | sudoscip-shell system . . sudo. update-alternatives --install /usr/bin/llvm-linkscip-shell filesystem . . `/usr/bin/llvm-link`. llvm-link /usr/bin/llvm-link-${LLVM_SHORT_VERSION} 30 |
| 46 | sudoscip-shell system . . sudo. update-alternatives --install /usr/bin/llvm-disscip-shell filesystem . . `/usr/bin/llvm-dis`. llvm-dis /usr/bin/llvm-dis-${LLVM_SHORT_VERSION} 30 |
| 47 | |
| 48 | whichscip-shell system . . which. clang |
| 49 | clangscip-shell system . . clang. --version |
| 50 | clang-3.9 --version |
| 51 | |
| 52 | mkdirscip-shell system . . mkdir. -p ~/override_clang |
| 53 | lnscip-shell system . . ln. -s /usr/bin/clangscip-shell filesystem . . `/usr/bin/clang`. ~/override_clang/clang |
| 54 | lnscip-shell system . . ln. -s /usr/bin/clang++scip-shell filesystem . . `/usr/bin/clang++`. ~/override_clang/clang++ |
| 55 | lnscip-shell system . . ln. -s /usr/bin/llvm-configscip-shell filesystem . . `/usr/bin/llvm-config`. ~/override_clang/llvm-config |
| 56 | lnscip-shell system . . ln. -s /usr/bin/llvm-linkscip-shell filesystem . . `/usr/bin/llvm-link`. ~/override_clang/llvm-link |
| 57 | lnscip-shell system . . ln. -s /usr/bin/llvm-disscip-shell filesystem . . `/usr/bin/llvm-dis`. ~/override_clang/llvm-dis |
| 58 | sudoscip-shell system . . sudo. chmod +x ~/override_clang/* |
| 59 | |
| 60 | export PATH="$HOME/override_clang/:${PATH}" |
| 61 | whichscip-shell system . . which. clang |
| 62 | clangscip-shell system . . clang. --version |
| 63 | clang-3.9 --version |
| 64 | |
| 65 | whichscip-shell system . . which. python |
| 66 | python --version |
| 67 | pipscip-shell system . . pip. install psutil |