-
Notifications
You must be signed in to change notification settings - Fork 17
/
install_deb.sh
executable file
·78 lines (67 loc) · 1.85 KB
/
install_deb.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
# Note, wasi-sdk versions do NOT match llvm versions, e.g. wasi-sdk-12 actually uses llvm-11
LLVM_VERSION=13
WASI_SDK_VERSION=12
ARCH=$(uname -m)
if [[ $ARCH = "x86_64" ]]; then
SHFMT_URL=https://github.com/mvdan/sh/releases/download/v3.4.3/shfmt_v3.4.3_linux_amd64
WASI_SDK_URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$WASI_SDK_VERSION/wasi-sdk_$WASI_SDK_VERSION.0_amd64.deb
elif [[ $ARCH = "aarch64" ]]; then
SHFMT_URL=https://github.com/patrickvane/shfmt/releases/download/master/shfmt_linux_arm
echo "ARM64 support is still a work in progress!"
exit 1
else
echo "This script only supports x86_64 and aarch64"
exit 1
fi
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
apt-utils \
man-db \
&& yes | unminimize
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
automake \
bc \
bsdmainutils \
build-essential \
binutils-dev \
ca-certificates \
cmake \
curl \
fonts-dejavu \
fonts-cascadia-code \
fonts-roboto \
gdb \
git \
gpg-agent \
gnuplot \
hey \
httpie \
imagemagick \
jq \
less \
libssl-dev \
libtinfo5 \
libtool \
libz3-4 \
lsb-release \
make \
netpbm \
openssh-client \
pango1.0-tools \
pkg-config \
shellcheck \
software-properties-common \
strace \
valgrind \
wabt \
wamerican \
wget
wget $SHFMT_URL -O shfmt && chmod +x shfmt && sudo mv shfmt /usr/local/bin/shfmt
sudo ./install_llvm.sh $LLVM_VERSION
curl -sS -L -O $WASI_SDK_URL && sudo dpkg -i wasi-sdk_$WASI_SDK_VERSION.0_amd64.deb && rm -f wasi-sdk_$WASI_SDK_VERSION.0_amd64.deb
if [ -z "${WASI_SDK_PATH}" ]; then
export WASI_SDK_PATH=/opt/wasi-sdk
echo "export WASI_SDK_PATH=/opt/wasi-sdk" >> ~/.bashrc
fi
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable --component rustfmt --target wasm32-wasi -y
echo "Run 'source ~/.bashrc'"