Skip to content

Commit 4844576

Browse files
committed
chore: WIP improvements to install script
1 parent ff0ed3e commit 4844576

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

install_deb.sh

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,40 @@
11
#!/bin/bash
22
# Installs dependencies, builds Silverfish, and places it into your path
33
# 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
424
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+
632
source $HOME/.cargo/env
33+
export PATH="$HOME/.cargo/bin:$PATH"
734
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
835
LLVM_VERSION=9
936
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$LLVM_VERSION 100
1037
sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-$LLVM_VERSION 100
1138
sudo apt install libc++-dev libc++abi-dev --yes
1239
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

0 commit comments

Comments
 (0)