aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-19 21:43:25 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-19 21:43:25 +0100
commitd2eeffcc9eb221556283680fcc6edcef2115c633 (patch)
tree89b9fb1676dd2db534a9e73ea9b8ecfe4f245516
parent0acfd41318d6e39a7f753f1f15320aab97d0b749 (diff)
downloadvulns-d2eeffcc9eb221556283680fcc6edcef2115c633.tar.gz
scripts/cve_update: count lines removed properly
Sometimes we want to just remove lines, so catch that in the diff Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rwxr-xr-xscripts/cve_update2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/cve_update b/scripts/cve_update
index f8c874bc..a12b997a 100755
--- a/scripts/cve_update
+++ b/scripts/cve_update
@@ -59,7 +59,7 @@ for id in cve/published/*/*.sha1 ; do
# see if the json and/or mbox files actually changed, EXCEPT for the bippy-VERSIONINFO string
changed=0
- diff=$(diff -u "${root}.json" "${tmp_json}" | grep -v "${tmp_json}" | grep -v "${root}.json" | grep -v "bippy-" | grep -v "^@@ " | grep "^+")
+ diff=$(diff -u "${root}.json" "${tmp_json}" | grep -v "${tmp_json}" | grep -v "${root}.json" | grep -v "bippy-" | grep -v "^@@ " | grep "^[+|-]")
#echo "diff json=${diff}"
if [[ "${diff}" != "" ]] ; then
mv -f "${tmp_json}" "${root}.json"