diff --git a/src/main/scripts/cdpd-patcher b/src/main/scripts/cdpd-patcher index b5a6abc..6ae975e 100755 --- a/src/main/scripts/cdpd-patcher +++ b/src/main/scripts/cdpd-patcher @@ -42,7 +42,7 @@ patch_url="`cat $tmp | jq -r .centos7.patch_url`" wget -nv -O $tmp "${patch_url}/${COMPONENT}-source.patch" || wget -nv -O $tmp "${patch_url}/dag_build/${COMPONENT}-source.patch" -git apply -p1 -C0 $tmp +git apply -p1 -C0 $tmp || git apply -3 -p1 -C0 $tmp if [[ "$build" < "7.2.1" ]];then sed -i "s/pig.version>0.16.0.*0.16.0.${build} " && exit 1 + + +function candidateJars() { + [ ! -d "$1" ] && echo "$1 is not a dir" >&2 && exit 1 +# find "$1" -name "hive*jar" >&2 + find "$1" -name "hive*jar" +} + +DIR="$1" +PAT="$2" +candidateJars "$DIR" | xargs -n1 unzip -t | fgrep -f <(echo Archive:;echo "$PAT") | grep -B1 "$PAT"