init
[nethome.git] / bin / diffgdbdir
1 #! /bin/sh
2
3 x="*.log"
4 if [ "$1" = "log" ];then
5         x="*.sum"
6         shift
7 fi
8
9 if [ $# != 2 ];then
10         echo >&2 "$0 hammock/xxxxyyzzname hammock/XXXXYYZZothername"
11         exit 1
12 fi
13
14 diffed=false
15 function diffit
16 {
17         dir1=$1/out
18         dir2=$2/out
19         if [ ! -e "$dir2" ];then
20                 echo "MISSING: $dir1 $dir2"
21                 return
22         fi
23         diffgdb -x "$x" $dir1 $dir2
24         diffed=true
25 }
26
27 for arch in x86_64 i386;do
28         if [ -d $1-$arch ];then
29                 diffit $1-$arch $2-$arch
30         fi
31         if [ -d $1$arch ];then
32                 diffit $1$arch $2$arch
33         fi
34         if [ -d $1/*-$arch ];then
35                 diffit $1/*-$arch $2/*-$arch
36         fi
37 done
38 if [ -d $1/out ];then
39         diffit $1 $2
40 fi
41 if ! $diffed;then
42         echo "NOT FOUND: $1 $2"
43 fi