From 705abf8e35eb86706ef65510fc5a471d6aece6cb Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Wed, 24 Feb 2016 12:06:42 +0100 Subject: [PATCH] Add an optional IGNORE_FILESIZE flag --- docker-diff | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-diff b/docker-diff index ddcc953..447c45f 100755 --- a/docker-diff +++ b/docker-diff @@ -7,7 +7,11 @@ IMAGE_B=$2 container_a=$(docker create "$IMAGE_A" /dontexist) container_b=$(docker create "$IMAGE_B" /dontexist) -AWK='{printf "%-10s %-10s %-100s\n",$1,$3,$6}' +if [ "$IGNORE_FILESIZE" = "1" ]; then + AWK='{printf "%-10s %-100s\n",$1,$6}' +else + AWK='{printf "%-10s %-10s %-100s\n",$1,$3,$6}' +fi diff <(docker export "$container_a" | docker run -i --rm ubuntu tar tvf - | awk "$AWK") <(docker export "$container_b" | docker run -i --rm ubuntu tar tvf - | awk "$AWK")