mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 11:14:08 +00:00
33 lines
682 B
Bash
Executable File
33 lines
682 B
Bash
Executable File
#!/usr/bin/env bash
|
||
# Install cargo/rust packages.
|
||
#
|
||
# shellcheck source=shared.sh
|
||
source "$HOME/.dotfiles/scripts/shared.sh"
|
||
|
||
! have cargo && {
|
||
msg "cargo could not be found. installing cargo with rustup.rs"
|
||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||
}
|
||
|
||
packages=(
|
||
# a subprocess caching utility
|
||
"bkt"
|
||
# a structural diff that understands syntax
|
||
"difftastic"
|
||
# a modern replacement for ‘ls’.
|
||
"eza"
|
||
# A simple, fast and user-friendly alternative to 'find'
|
||
"fd-find"
|
||
)
|
||
|
||
for pkg in "${packages[@]}"; do
|
||
# Trim spaces
|
||
pkg=${pkg// /}
|
||
# Skip comments
|
||
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
|
||
|
||
cargo install $pkg
|
||
|
||
echo ""
|
||
done
|