-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·33 lines (28 loc) · 919 Bytes
/
install.sh
File metadata and controls
executable file
·33 lines (28 loc) · 919 Bytes
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
#!/bin/bash
set -euo pipefail
# fix home issues
export HOME=/root
# Install Rustup
if ! command -v rustup >/dev/null 2>&1
then
echo "Installing Rustup..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -t wasm32-unknown-unknown --profile minimal
source "$HOME/.cargo/env"
else
echo "Rustup already installed."
fi
# Ensure required Rust target is available
rustup target add wasm32-unknown-unknown
# Install trunk using binstall
if ! command -v trunk
then
echo "Installing trunk with binstall..."
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall --targets x86_64-unknown-linux-musl -y trunk
echo "Trunk installation complete."
else
echo "trunk already installed."
fi
# Build project with trunk
echo "Building project with trunk --release"
trunk build --release