File tree Expand file tree Collapse file tree 1 file changed +29
-4
lines changed Expand file tree Collapse file tree 1 file changed +29
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# Installs dependencies, builds Silverfish, and places it into your path
3
3
# Be sure to validate the Rust and LLVM install scripts we invoke below!
4
+
5
+ # TODO: Error Checking. Bail if not executing script from project root because we use relative paths
6
+
7
+ # Check to see if ./wasmception directory exists and is not empty.
8
+ # If not assume user didn't initialize submodules
9
+ if [[ ! -d " ./wasmception" ]] || [[ -z " $( ls -A wasmception) " ]]; then
10
+ git submodule update --init --recursive
11
+ fi
12
+
13
+ # Wasmception
14
+ # Install Subversion
15
+ sudo apt install subversion --yes
16
+
17
+ # Build
18
+ # This is super slow. Does something need to get modified in the Makefile?
19
+ cd wasmception
20
+ make
21
+ cd ..
22
+
23
+ # # Silverfish
4
24
sudo apt install build-essential --yes
5
- curl https://sh.rustup.rs -sSf | sh
25
+
26
+ if [[ -x " $( command -v rustup) " ]]; then
27
+ rustup update
28
+ else
29
+ curl https://sh.rustup.rs -sSf | bash -s -- -y
30
+ fi
31
+
6
32
source $HOME /.cargo/env
33
+ export PATH=" $HOME /.cargo/bin:$PATH "
7
34
sudo bash -c " $( wget -O - https://apt.llvm.org/llvm.sh) "
8
35
LLVM_VERSION=9
9
36
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$LLVM_VERSION 100
10
37
sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-$LLVM_VERSION 100
11
38
sudo apt install libc++-dev libc++abi-dev --yes
12
39
cargo build --release
13
- mkdir -p $HOME /bin
14
- cp -t $HOME /bin target/release/silverfish
15
- source $HOME /bin
40
+ sudo cp -t /usr/bin ./target/release/silverfish
You can’t perform that action at this time.
0 commit comments