anki/tools/ts-watch

13 lines
314 B
Plaintext
Raw Normal View History

#!/bin/bash
#
# Monitor the ts folder and rebuild aqt's data each time
# it changes, for testing pages locally.
#
# On a Mac, useful to combine with ts-run.
# run once at startup
cmd='printf \\033c\\n; bazel build qt:runanki'
sh -c "$cmd"
# then monitor for changes
fswatch -r -o ts | xargs -n1 -I{} sh -c "$cmd"