commit b5a9016a3d7ca0d6843a357f2ffc0118ad5bfc50 Author: Matthew Finkel sysrqb@torproject.org Date: Thu Jan 21 21:11:55 2021 +0000
Clean up java_audit script --- audits/java_audit.sh | 12 ------------ 1 file changed, 12 deletions(-)
diff --git a/audits/java_audit.sh b/audits/java_audit.sh index 51c9bf4..1417011 100644 --- a/audits/java_audit.sh +++ b/audits/java_audit.sh @@ -61,34 +61,22 @@ KEYWORDS+=("::post(") KEYWORDS+=("::get(")
cd $REPO_DIR -#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" ]; then 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 fi
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"