mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-04 19:48:55 +00:00
refactor(scripts): inline cargo packages into install script
Move package list from config/asdf/cargo-packages into install-cargo-packages.sh as a bash array and remove the external file. Update documentation accordingly.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# install-cargo-packages
|
||||
|
||||
Install Rust packages listed in `config/asdf/cargo-packages`.
|
||||
Install Rust packages defined in the script.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -8,5 +8,14 @@ Install Rust packages listed in `config/asdf/cargo-packages`.
|
||||
scripts/install-cargo-packages.sh
|
||||
```
|
||||
|
||||
The script installs each package with `cargo install` and runs
|
||||
`cargo-install-update` when available to update existing packages.
|
||||
## What it does
|
||||
|
||||
1. If `cargo-install-update` is available, updates all existing packages first
|
||||
and tracks which packages are already installed.
|
||||
2. Installs each package from the inline list using `cargo install`,
|
||||
skipping any already handled by the update step.
|
||||
Builds run in parallel using available CPU cores (minus two).
|
||||
3. Runs package-specific post-install steps.
|
||||
4. Cleans the cargo cache with `cargo cache --autoclean`.
|
||||
|
||||
To add or remove packages, edit the `packages` array in `scripts/install-cargo-packages.sh`.
|
||||
|
||||
Reference in New Issue
Block a user