timewarrior/test/atomic.t
Shaun Ruffell 8e99c07d85 Introduce AtomicFiles
Introduce AtomicFile and a test of this module to the code.

AtomicFile is like File, except all writes go to temporary files until
the class method finalize_all () is called and the temporary files are
copied over the real files. If any writes fail, like when there is no
more space on the filesystem, none of the files in the database will be
modified.

Since we need version 1.00 of libfiu, I have only added it to the debian
testing container, which includes libfiu-1.00 in the default repository.

Related to #155
2020-02-23 19:03:40 +01:00

7 lines
158 B
Bash
Executable file

#!/bin/sh
BASEDIR=$(dirname "$0")
if ldd ${BASEDIR}/atomic | grep -q 'libfiu' ; then
exec fiu-run -x ${BASEDIR}/atomic
else
exec ${BASEDIR}/atomic
fi