Commit b5a9016a authored by Matthew Finkel's avatar Matthew Finkel
Browse files

Clean up java_audit script

parent b72a5306
......@@ -61,34 +61,22 @@ KEYWORDS+=("::post\(")
#function join_by { local d=$1; shift; local f=$1; shift; printf %s "$f" "${@/#/ $d}"; }
#GREP_LINE="$(join_by \-G ${KEYWORDS[@]})"
#base=`git merge-base ${OLD} ${NEW}`
if [ ! -f "release-${OLD}-${NEW}.diff" ];
#if [ ! -f "release-${base}-${NEW}.diff" ];
echo "Diffing release-${OLD}-${NEW}.diff"
#echo "Diffing release-${base}-${NEW}.diff"
git diff --color=always --color-moved $OLD $NEW -U20 > release-${OLD}-${NEW}.diff
#git diff --color=always --color-moved $base $NEW -U20 > release-${base}-${NEW}.diff
#git diff --color=always --color-moved -G${GREP_LINE} $OLD $NEW -U20 > release-${OLD}-${NEW}-G.diff
echo "Done with diff"
function join_by { local d=$1; shift; local f=$1; shift; printf %s "$f" "${@/#/$d}"; }
GREP_LINE="$(join_by \| ${KEYWORDS[@]})"
#GREP_LINE="\+\+\+ |$(join_by \| ${KEYWORDS[@]})"
export GREP_COLOR="05;37;41"
# XXX: Arg this sometimes misses file context
#egrep -A40 -B40 --color=always "${GREP_LINE}" release-${base}-${NEW}.diff > keywords-${base}-${NEW}-$SCOPE.diff
egrep -A40 -B40 --color=always "${GREP_LINE}" release-${OLD}-${NEW}.diff > keywords-${OLD}-${NEW}-$SCOPE.diff
echo "Diff generated. View it with:"
#echo " less -R $REPO_DIR/keywords-$base-$NEW-$SCOPE.diff"
echo " less -R $REPO_DIR/keywords-$OLD-$NEW-$SCOPE.diff"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment