blob: 7dd4fb4bd5ce1500bfd7e48dd2ff18240d8d9eab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
|