X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=bin%2Fdiffgdbdir;h=c572cf411dd3e875c5f40af2b00259a9fd330109;hp=1866de2289cc706026437c74d3b8d18f1bf6a638;hb=a50406d2dc76007aa5ab4ec3db66f70d96da31d7;hpb=029de65e3045014a7aae8aa3e0ba5be5ad430d48 diff --git a/bin/diffgdbdir b/bin/diffgdbdir index 1866de2..c572cf4 100755 --- a/bin/diffgdbdir +++ b/bin/diffgdbdir @@ -1,16 +1,32 @@ #! /bin/sh x="*.log" -o="-f" -if [ "$1" = "-r" ];then - o="-r" - shift -fi -if [ "$1" = "log" ];then - x="*.sum" - o="-r" - shift -fi +x2="foobar" +o="" +while true;do + if [ "$1" = "-r" ];then + o="$o -r" + shift + continue + fi + if [ "$1" = "-N" ];then + o="$o -N" + shift + continue + fi + if [ "$1" = "log" ];then + x="*.sum" + o="-r" + shift + continue + fi + if [ "$1" = "pie" ];then + x2="*pie*" + shift + continue + fi + break +done if [ $# != 2 ];then echo >&2 "$0 hammock/xxxxyyzzname hammock/XXXXYYZZothername" @@ -18,17 +34,21 @@ if [ $# != 2 ];then fi diffed=false -function diffit +function diffitraw { - dir1=$1/out - dir2=$2/out + dir1=$1 + dir2=$2 if [ ! -e "$dir2" ];then echo "MISSING: $dir1 $dir2" return fi - diffgdb $o -x "$x" $dir1 $dir2 + diffgdb $o -x rpm-qa -x "$x" -x "$x2" $dir1 $dir2 diffed=true } +function diffit +{ + diffitraw $1/out $2/out +} if [ -f "$1" -a ! -e "${1%.tar.xz}" ];then ( @@ -68,6 +88,11 @@ if [ -d $1/out ];then diffit $1 $2 diffed=true fi +if [ "$1" != "${1#tests/}" -a -d $1 ];then + diffitraw $1 $2 + diffed=true +fi if ! $diffed;then - echo "NOT FOUND: $1 $2" + diffitraw $1 $2 + #echo "NOT FOUND: $1 $2" fi