You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
laughing-hipster/plugins/230-rust.sh

17 lines
464 B

#!/bin/sh
export RUSTUP_HOME="${HOME}/.config/rust/.rustup";
export CARGO_HOME="${HOME}/.config/rust/.cargo";
export PATH=${PATH}:${CARGO_HOME}/bin;
if [[ "${FILES_INSTALL_TOOLS}" = "true" ]] && ! [[ -d ${CARGO_HOME} ]]; then
# install rust
echo "Installing rustup + rust stable";
curl -sLSf https://sh.rustup.rs > /tmp/rustup.sh;
chmod +x /tmp/rustup.sh && /tmp/rustup.sh -y --no-modify-path;
fi
[[ -s "${CARGO_HOME}/env" ]] && source ${CARGO_HOME}/env;