diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-10-20 20:42:28 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-10-20 21:36:46 +0200 |
commit | 9f9385e091a925ecf1d711daece1740138d12d59 (patch) | |
tree | 5340cf50e4ae1e80442dd7960aa2f19cd6f0ffb0 /README.md | |
parent | 854c2b61a045b1f9804ed9c44da3ed10a2e3ec2f (diff) |
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..7dd4fb4 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# Installation +```sh +git clone https://git.spacehb.net/wbr +cd wbr +go install . +``` + +# Example +Run `./build.sh` whenever a file ending with '.c' or '.h' is modified: +```sh +wbr -r './build.sh' -s '.c,.h' +``` +Run a c file from the `src/` directory whenever it is modified: +```sh +wbr -b 'tcc -run' -p src/ +``` +Compile a c file with `common.c` and run it. +```sh +wbr -b 'gcc -Wall -Werror common.c' -r './a.out' -s '.c' +``` + +# Usage +```txt +Usage of wbr: + -b string + Command to run for building, it will pass the file modified as argument to it + -p string + Path to watch for files (default ".") + -r string + Command for running after build + -s string + Filter watched files by suffix, specify multiple by separating with ',' + -v Show wbr version +``` + +## Pro tip: +- use `set -x` in your build scripts |