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