mirror of
https://github.com/system76/firmware-open.git
synced 2025-07-04 05:13:23 +00:00
25 lines
637 B
Bash
Executable file
25 lines
637 B
Bash
Executable file
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
# Install Rust via rustup, along with the pinned toolchain.
|
|
|
|
# shellcheck shell=dash
|
|
# shellcheck disable=SC1091
|
|
|
|
set -Ee
|
|
|
|
if ! command -v rustup >/dev/null 2>&1; then
|
|
if command -v rustup-init >/dev/null 2>&1; then
|
|
rustup-init -y \
|
|
--default-toolchain stable \
|
|
--profile minimal \
|
|
--no-update-default-toolchain
|
|
else
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
|
|
| sh -s -- -y --default-toolchain stable
|
|
fi
|
|
|
|
. "${HOME}/.cargo/env"
|
|
fi
|
|
|
|
rustup show active-toolchain || rustup toolchain install
|