Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nilsmartel/awaitchange
Useful when one only wants to perform commands on filechanges
https://github.com/nilsmartel/awaitchange
cli file rust system
Last synced: 2 months ago
JSON representation
Useful when one only wants to perform commands on filechanges
- Host: GitHub
- URL: https://github.com/nilsmartel/awaitchange
- Owner: nilsmartel
- Created: 2019-12-13T10:31:25.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-23T17:17:51.000Z (almost 2 years ago)
- Last Synced: 2024-08-01T15:36:32.599Z (5 months ago)
- Topics: cli, file, rust, system
- Language: Rust
- Size: 31.3 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# awaitchange
Command line tool that does little, is easy to use and helps a lot!
## Usage
```
awaitchange 0.3.0USAGE:
awaitchange [OPTIONS] [watch]...FLAGS:
-h, --help Prints help information
-V, --version Prints version informationOPTIONS:
-r How many times per second files should get checked for updates [default: 2]
--do Command to be executed on filechange. If unset, awaitchange simply exits on filechange and
yields controll to the programm next in lineARGS:
... Files to be watched```
## Example
lets say you want to update your kubernetes objects, every time you changed your deployment or service config,
you'd use awaitchange like this:
```sh
while [ true ]
do
clear # Clear terminal window
kubectl apply -f deployment.yaml
kubectl apply -f service.yamlawaitchange deployment.yaml service.yaml
done
```There is a shorthand for this, just use the `--do` flag an pass a script, that should be executed (in `sh`)
```sh
awaitchange deployment.yaml --do "kubectl apply -f deployment.yaml"
```