From 9f9385e091a925ecf1d711daece1740138d12d59 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 20 Oct 2024 20:42:28 +0200 Subject: Added README --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 README.md (limited to 'README.md') 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 -- cgit v1.2.3