Crates.io | asyncrun |
lib.rs | asyncrun |
version | 0.0.6 |
source | src |
created_at | 2024-08-21 17:11:23.021838 |
updated_at | 2024-09-06 10:14:10.625035 |
description | Asynchronously execute shell commands in filtered subdirectories. |
homepage | |
repository | https://github.com/kingwingfly/asyncrun |
max_upload_size | |
id | 1346739 |
size | 271,581 |
Asynchronously execute shell commands in filtered subdirectories.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Do things like find . -type d -name ".git" | xargs -I _ -P 64 sh -c "cd _/.. && git pull --rebase &> /dev/tty"
easier if you're not a unix-pro guy.
Instead, just asyncrun -e .git -- "git pull --rebase"
.
Download at release page. Or
cargo install asyncrun
Or compile yourself:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/kingwingfly/asyncrun.git
cargo build --release
Asynchronously execute shell commands in filtered subdirectories
Usage: asyncrun [OPTIONS] [PATH] -- <COMMANDS>...
Arguments:
[PATH] Path to search for directories [default: /Users/louis/rust/asyncrun]
<COMMANDS>... Commands to run in each directory
Options:
-e <EXIST> Filter by file/dir names all exist
-E <NOT_EXIST> Filter by file/dir names all non-exist
-n <ASYNC_NUM> Number of async commands to run concurrently [default: 1024]
-h, --help Print help
-V, --version Print version
asyncrun -e .git -- "git fetch -p" "git pull --rebase" "git gc"
asyncrun -e .git -e Cargo.toml -- "cargo update" "git add ." "git commit -m 'update deps'" "git push"
asyncrun -e Cargo.toml -e target -- "cargo clean"
asyncrun -e .git -e .DS_Store -e .gitignore -- "git pull --rebase" "rm .DS_Store" "git add ." "git commit -m 'rm .DS_Store'" "grep -qxF '.DS_Store' .gitignore || echo '.DS_Store' >> .gitignore" "git add ." "git commit -m 'modified .gitignore'" "git push" | tee output.txt
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE.txt
for more information.
Louis - 836250617@qq.com
Project Link: https://github.com/kingwingfly/asyncrun