From d598aade16b0bcd68905c307e9bad6ba5408fee2 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Mon, 27 Nov 2023 19:08:51 +0200 Subject: [PATCH] chore(scripts): update cargo install script --- scripts/install-cargo-packages.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/install-cargo-packages.sh b/scripts/install-cargo-packages.sh index b5d0d71..3e29f6c 100755 --- a/scripts/install-cargo-packages.sh +++ b/scripts/install-cargo-packages.sh @@ -2,17 +2,27 @@ # Install cargo/rust packages. # # shellcheck source=shared.sh +source "$HOME/.dotfiles/config/exports" +source "$HOME/.dotfiles/config/alias" +source "$HOME/.dotfiles/config/functions" source "$HOME/.dotfiles/scripts/shared.sh" msg "Starting to install rust/cargo packages" ! x-have cargo && { msg "cargo could not be found. installing cargo with rustup.rs" - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path -y } source "$CARGO_HOME/env" +! x-have rustup && { + msg_err "rustup could not be found. Aborting..." + exit 1 +} + +rustup default system + packages=( # starship.rs "starship"