]> git.pond.sub.org Git - empserver/blob - src/scripts/nightly/diff_to_prev.sh
A sandbox system to automate the building of the source tree and
[empserver] / src / scripts / nightly / diff_to_prev.sh
1 #!/bin/sh
2 #
3 # $Id$$Source$
4 #
5 # Check differences between the last two logs
6 #
7 # Blame it on marcolz
8 #
9
10 PROGNAME="$0"
11
12 usage() {
13         echo "Usage: ${PROGNAME} <configfile>" >&2;
14         exit 1;
15 }
16
17 [ $# -lt 1 ] && usage
18
19 [ -f "$1" ] || usage
20
21 # Source config file
22 case "$1"
23 in
24         */*)
25                 . "$1"
26                 ;;
27         *)
28                 . ./"$1"
29                 ;;
30 esac
31
32 [ -f "${SCRIPTDIR}/common.sh" ] || { echo "Broken config ?" >&2; exit 1; }
33 . "${SCRIPTDIR}"/common.sh
34
35 cd "${LOGDIR}" || err "Could not cd to ${LOGDIR}"
36
37 diff -u $(ls "${EMPTARGET}.${ARCH}."* | tail -2)