scx-upstream/meson-scripts/cargo_fetch
2023-12-08 08:45:44 -10:00

18 lines
462 B
Bash
Executable File

#!/bin/bash
shopt -s globstar
set -e
cargo="$1"
#
# Run `cargo fetch` for each Cargo.toml found in the source directory. This
# can lead to fetching unnecessary packages if the source directory contains
# past cargo build artifacts. While not ideal, this is a lot simpler and
# shouldn't cause problems in practice.
#
for manifest in ${MESON_SOURCE_ROOT}/**/Cargo.toml; do
echo "Fetching for $manifest"
"$cargo" fetch --manifest-path="$manifest"
done