#!/bin/bash set -ae tempdir=$( mktemp -d --tmpdir freeside-test.XXXX ) # get the parent directory of bin/(this script) testroot=$( dirname ${BASH_SOURCE[0]} ) testroot=$( cd $testroot; cd ..; pwd ) echo "Starting test mode." $testroot/bin/freeside-test-start echo "Saving results to $tempdir." $testroot/bin/freeside-test-fetch -d $tempdir echo "Exiting test mode." $testroot/bin/freeside-test-stop || true diffname=freeside-test.`date +%Y%m%d`.diff echo "Writing diff to $diffname." diff -urb "$testroot/share/output" "$tempdir" > $diffname diffstat -C $diffname