X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=bin%2Fdiffgdbdir;h=c572cf411dd3e875c5f40af2b00259a9fd330109;hp=2f2ab2d4ce2de9776f4ef3168358dba79f47d9f6;hb=11606c698522b4651509e39735fc13f96575e262;hpb=94013253af37a4028e40118bb60e4b05104bb51a diff --git a/bin/diffgdbdir b/bin/diffgdbdir index 2f2ab2d..c572cf4 100755 --- a/bin/diffgdbdir +++ b/bin/diffgdbdir @@ -1,6 +1,7 @@ #! /bin/sh x="*.log" +x2="foobar" o="" while true;do if [ "$1" = "-r" ];then @@ -13,12 +14,17 @@ while true;do shift continue fi - if [ "$1" = "log" -o "$1" = "-l" ];then + if [ "$1" = "log" ];then x="*.sum" o="-r" shift continue fi + if [ "$1" = "pie" ];then + x2="*pie*" + shift + continue + fi break done @@ -36,7 +42,7 @@ function diffitraw echo "MISSING: $dir1 $dir2" return fi - diffgdb $o -x rpm-qa -x "$x" $dir1 $dir2 + diffgdb $o -x rpm-qa -x "$x" -x "$x2" $dir1 $dir2 diffed=true } function diffit @@ -44,26 +50,22 @@ function diffit diffitraw $1/out $2/out } -if [ -f "$1" ];then - if [ ! -e "${1%.tar.xz}" ];then - ( - cd "$(dirname "$1")" - tar xJf "$(basename "$1")" - ) - fi +if [ -f "$1" -a ! -e "${1%.tar.xz}" ];then + ( + cd "$(dirname "$1")" + tar xJf "$(basename "$1")" + ) set "${1%.tar.xz}" "$2" if [ ! -d "$1" ];then echo "! $1" exit 1 fi fi -if [ -f "$2" ];then - if [ ! -e "${2%.tar.xz}" ];then - ( - cd "$(dirname "$2")" - tar xJf "$(basename "$2")" - ) - fi +if [ -f "$2" -a ! -e "${2%.tar.xz}" ];then + ( + cd "$(dirname "$2")" + tar xJf "$(basename "$2")" + ) set "$1" "${2%.tar.xz}" if [ ! -d "$2" ];then echo "! $2" @@ -91,5 +93,6 @@ if [ "$1" != "${1#tests/}" -a -d $1 ];then diffed=true fi if ! $diffed;then - echo "NOT FOUND: $1 $2" + diffitraw $1 $2 + #echo "NOT FOUND: $1 $2" fi