diff options
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 |