diff options
Diffstat (limited to 'run_verify.sh')
-rwxr-xr-x | run_verify.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/run_verify.sh b/run_verify.sh index 743d8083..719cb632 100755 --- a/run_verify.sh +++ b/run_verify.sh @@ -1,5 +1,16 @@ #!/bin/bash +# This script can be from cron to regularly verify that Ledger is +# sane. Such a cron entry might look like this, assuming you keep a +# recent working tree in ~/src/ledger, and that you want all of the +# temporary build products kept in /tmp: +# +# 0 0 * * * $HOME/src/ledger/run_verify.sh /tmp +# +# Note that this script should be run as root! Also, whether on +# success or failure the build log and build products are left in the +# temporary directory for later examination if desired. + SRCDIR=$(dirname $0) if [ -n "$1" -a -d "$1" ]; then @@ -12,4 +23,6 @@ cd $TMPDIR || exit 1 cp -p "$SRCDIR"/verify.sh . || exit 1 -./verify.sh > verify.out 2>&1 || (cat verify.out; exit 1) +(./verify.sh > verify.out 2>&1 || (cat verify.out; exit 1)) + +rm -f verify.sh |