chore(scripts): eval scripts/shared.sh

This commit is contained in:
2024-07-17 10:04:16 +03:00
parent 8a3b2e703c
commit adecceda7a
21 changed files with 21 additions and 39 deletions

View File

@@ -2,27 +2,12 @@
# 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"
eval "$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 -y
}
source "$CARGO_HOME/env"
! x-have rustup && {
msg_err "rustup could not be found. Aborting..."
exit 1
}
rustup default stable
# If we have cargo install-update, use it first
x-have cargo-install-update && {
msg_run "Updating cargo packages with cargo install-update"