| 1 | #! /usr/bin/env bash |
| 2 | # tldr; AGPLv3+ |
| 3 | # copyright info at bottom |
| 4 | |
| 5 | # build directory when any file is modified |
| 6 | inotifywait \ |
| 7 | --quiet \ |
| 8 | --recursive \ |
| 9 | --monitor \ |
| 10 | --event close_write \ |
| 11 | --format %f \ |
| 12 | . | \ |
| 13 | while IFS= read -r file; do |
| 14 | make |
| 15 | done |
| 16 | |
| 17 | # goes great with |
| 18 | # https://addons.mozilla.org/en-US/firefox/addon/auto-reload/ |
| 19 | # url regex: |
| 20 | # challenge-bot\.html |
| 21 | # local files |
| 22 | # $CWD/challenge-bot.html |
| 23 | |
| 24 | # Copyright 2016 daniel watson |
| 25 | |
| 26 | # This file is part of challenge-bot. |
| 27 | |
| 28 | # challenge-bot is free software: you can redistribute it and/or modify |
| 29 | # it under the terms of the GNU Affero General Public License as |
| 30 | # published by the Free Software Foundation, either version 3 of the |
| 31 | # License, or (at your option) any later version. |
| 32 | |
| 33 | # challenge-bot is distributed in the hope that it will be useful, |
| 34 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 35 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 36 | # GNU Affero General Public License for more details. |
| 37 | |
| 38 | # You should have received a copy of the GNU Affero General Public |
| 39 | # License along with challenge-bot. If not, see |
| 40 | # <http://www.gnu.org/licenses/>. |