From 42b88e36a06191dcc12030d3732568243031b845 Mon Sep 17 00:00:00 2001 From: Zoltan Haindrich Date: Wed, 15 Sep 2021 17:31:59 +0200 Subject: [PATCH] add find_affected_jars --- src/main/scripts/find_affected_jars.bash | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 src/main/scripts/find_affected_jars.bash diff --git a/src/main/scripts/find_affected_jars.bash b/src/main/scripts/find_affected_jars.bash new file mode 100755 index 0000000..de59561 --- /dev/null +++ b/src/main/scripts/find_affected_jars.bash @@ -0,0 +1,20 @@ +#!/bin/bash -e + +[ "$1" == "" ] && echo "usage: $0 " && exit 1 +c="$1" + +find packaging/ -name 'hive*jar' -exec unzip -t "{}" \; > _contents + + +git diff "$c"|grep '^+++'| + cut -c 5-| + sed 's/java$/class/'| + grep 'class$'| + sed -r 's|^(.*/)|/|' > pats + + +fgrep -f <(cat pats;echo Archive:) _contents |fgrep -B1 -f pats +echo -e "\n --- \n" + +fgrep -f <(cat pats;echo Archive:) _contents |fgrep -B1 -f pats|grep Archive +