Added Rust crates script

Necessary to implement the installation of Rust and associated crates
which can be used by downstream configurations. This functionality was
originally part of the macOS Configuration project but has been moved
here to provide a common foundation in which to build upon.
This commit is contained in:
Brooke Kuhlmann
2021-03-14 10:35:58 -06:00
parent eec175e232
commit 35663cf8b3
5 changed files with 49 additions and 1 deletions

View File

@@ -171,6 +171,15 @@ install_program() {
}
export -f install_program
# Installs Rust.
# Parameters: None.
install_rust() {
if ! command -v cargo > /dev/null; then
curl --proto "=https" --tlsv1.2 --fail --silent --show-error https://sh.rustup.rs | sh
fi
}
export -f install_rust
# Installs an application via a tar file.
# Parameters: $1 (required) - URL, $2 (required) - Application name, $3 (required) - Decompress options.
install_tar_app() {