Add utility script to run cargo clean in a dir
parent
2561ad7aa6
commit
86b54db197
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/nu
|
||||||
|
|
||||||
|
def main [
|
||||||
|
dir: string # The directory that contains the rust projects
|
||||||
|
] {
|
||||||
|
echo $"Cleaning ($dir)"
|
||||||
|
(
|
||||||
|
ls $dir
|
||||||
|
| get name
|
||||||
|
| where ($it | ls $it | where name =~ 'Cargo.toml' | length ) > 0
|
||||||
|
| par-each { cd $in; cargo clean }
|
||||||
|
| ignore
|
||||||
|
)
|
||||||
|
echo $"($dir) cleaned"
|
||||||
|
}
|
Loading…
Reference in New Issue