Skip to content

Instantly share code, notes, and snippets.

@conikeec
Forked from TyOverby/cargo-deep-clean.sh
Created August 2, 2016 19:50
Show Gist options
  • Save conikeec/65d26d55c2c74828acf6d26a15ae5309 to your computer and use it in GitHub Desktop.
Save conikeec/65d26d55c2c74828acf6d26a15ae5309 to your computer and use it in GitHub Desktop.
find . | grep "Cargo.toml$" | # Find all cargo.toml files \
sed 's#/[^/]*$##' | # Remove the filename leaving us with the directories containing cargo.toml files \
xargs -L1 printf "cd \"%s\"; cargo clean; cd -\n" | # Print "cd path/to/crate; cargo clean; cd -" \
bash # Execute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment