From 94013253af37a4028e40118bb60e4b05104bb51a Mon Sep 17 00:00:00 2001 From: jkratoch <> Date: Mon, 6 Sep 2010 19:23:03 +0000 Subject: [PATCH] Support -l for the logs. Ignore the "rpm-qa" file. Fix comparison of *.tar.xz if they are already unpacked. --- bin/diffgdbdir | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/bin/diffgdbdir b/bin/diffgdbdir index 636fb2c..2f2ab2d 100755 --- a/bin/diffgdbdir +++ b/bin/diffgdbdir @@ -13,7 +13,7 @@ while true;do shift continue fi - if [ "$1" = "log" ];then + if [ "$1" = "log" -o "$1" = "-l" ];then x="*.sum" o="-r" shift @@ -36,7 +36,7 @@ function diffitraw echo "MISSING: $dir1 $dir2" return fi - diffgdb $o -x "$x" $dir1 $dir2 + diffgdb $o -x rpm-qa -x "$x" $dir1 $dir2 diffed=true } function diffit @@ -44,22 +44,26 @@ function diffit diffitraw $1/out $2/out } -if [ -f "$1" -a ! -e "${1%.tar.xz}" ];then - ( - cd "$(dirname "$1")" - tar xJf "$(basename "$1")" - ) +if [ -f "$1" ];then + if [ ! -e "${1%.tar.xz}" ];then + ( + cd "$(dirname "$1")" + tar xJf "$(basename "$1")" + ) + fi set "${1%.tar.xz}" "$2" if [ ! -d "$1" ];then echo "! $1" exit 1 fi fi -if [ -f "$2" -a ! -e "${2%.tar.xz}" ];then - ( - cd "$(dirname "$2")" - tar xJf "$(basename "$2")" - ) +if [ -f "$2" ];then + if [ ! -e "${2%.tar.xz}" ];then + ( + cd "$(dirname "$2")" + tar xJf "$(basename "$2")" + ) + fi set "$1" "${2%.tar.xz}" if [ ! -d "$2" ];then echo "! $2" -- 1.8.3.1