asyncrun 0.0.6

Asynchronously execute shell commands in filtered subdirectories.
asyncrun-0.0.6 is not a library.

Contributors Forks Stargazers Issues MIT License

About The Project

Product Name Screen Shot

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".

Built With

  • Rust

Getting Started

Download at release page. Or

cargo install asyncrun

Or compile yourself:

Prerequisites

  • Install Rust
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    

Compilation

  1. Clone the repo
    git clone https://github.com/kingwingfly/asyncrun.git
    
  2. Compilation
    cargo build --release
    

Usage

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

Example

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

Roadmap

  • Feature

See the open issues for a full list of proposed features (and known issues).

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Louis - 836250617@qq.com

Project Link: https://github.com/kingwingfly/asyncrun

Acknowledgments