flakebox-in-each-cargo-workspace 254 B

123456789101112
  1. #!/usr/bin/env bash
  2. # Run a given command in every directory that contains cargo workspace
  3. # Right now it just scans for `Cargo.lock`
  4. set -euo pipefail
  5. find . -name Cargo.lock | while read -r path ; do
  6. (
  7. cd "$(dirname "$path")"
  8. "$@"
  9. )
  10. done