apenwarr-redo/t/flush-cache.sh
Avery Pennarun 0126f6be1e Don't wipe the timestamp when a target fails to redo.
It's really a separate condition.  And since we're not removing the target
*file* in case of error - we update it atomically, and keeping it is better
than losing it - there's no reason to wipe the timestamp in that case
either.

However, we do need to know that the build failed, so that anybody else
(especially in a parallel build) who looks at that target knows that it
died.  So add a separate flag just for that.
2010-12-10 22:41:11 -08:00

9 lines
277 B
Bash
Executable file

#!/bin/sh
#echo "Flushing redo cache..." >&2
(
echo ".timeout 5000"
echo "pragma synchronous = off;"
echo "update Files set checked_runid=null, " \
" changed_runid=changed_runid-1, " \
" failed_runid=null;"
) | sqlite3 "$REDO_BASE/.redo/db.sqlite3"