export RUSTUP_INIT_SKIP_PATH_CHECK=yes # https://rustup.rs/ function install_rustup { if command -v rustup &> /dev/null; then echo "Rustup is already installed." return 1 fi curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path } if [ -d "${HOME}/.cargo" ]; then if [ -e "${HOME}/.cargo/env" ]; then source "$HOME/.cargo/env" fi export CARGO_TARGET_DIR="$HOME/.cache/cargo-target" if [ ! -e "${CARGO_TARGET_DIR}" ]; then mkdir -p "$CARGO_TARGET_DIR" fi fi