diff options
-rwxr-xr-x | run_verify.sh | 15 | ||||
-rwxr-xr-x | verify.sh | 8 |
2 files changed, 15 insertions, 8 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 @@ -1,11 +1,5 @@ #!/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. -# -# 0 0 * * * $HOME/src/ledger/run_verify.sh /tmp - MY_CPPFLAGS="-I/usr/local/include -I/usr/local/include/boost -I/sw/include" MY_LDFLAGS="-L/usr/local/lib -L/sw/lib" @@ -21,7 +15,7 @@ else fi if [ -d $TMPDIR/ledger ]; then - sudo rm -fr $TMPDIR/ledger || exit 1 + rm -fr $TMPDIR/ledger || exit 1 fi cd $TMPDIR || exit 1 |