X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=bin%2Fdiffgdbdir;h=c572cf411dd3e875c5f40af2b00259a9fd330109;hp=ad1095897300efbb7981b3962424063e0f15ded7;hb=a50406d2dc76007aa5ab4ec3db66f70d96da31d7;hpb=5b7268befaa7b1151a7e1fc82c11bc66dfad5b4b;ds=sidebyside diff --git a/bin/diffgdbdir b/bin/diffgdbdir index ad10958..c572cf4 100755 --- a/bin/diffgdbdir +++ b/bin/diffgdbdir @@ -14,7 +14,7 @@ while true;do shift continue fi - if [ "$1" = "log" -o "$1" = "-l" ];then + if [ "$1" = "log" ];then x="*.sum" o="-r" shift @@ -50,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"