clean 470 B

123456789101112
  1. #!/bin/bash
  2. set +e
  3. #cargo clean -v -p "${PWD##*/}"
  4. #^ project name might be different than current dir's name!
  5. cargo clean -vv
  6. #^ clean only the exe aka -p projectnamehere
  7. # to clean all(the deps too, eg. when using clippy, its deps which are kinda costly to rebuild then just don't use -p ...)
  8. find . -name target -type d -print0 | xargs -0 --no-run-if-empty --exit -P0 -- rm -vr --
  9. #^ 'rls' ran by 'ale' (in vim) creates a ./target/ in each project dir!
  10. echo 'Done'