forked from gwsystems/sledge-serverless-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_deb.sh
executable file
·76 lines (65 loc) · 1.68 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
#!/bin/bash
LLVM_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-12/wasi-sdk_12.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_12.0_amd64.deb && rm -f wasi-sdk_12.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'"