From 63516a0cf95e2d6a5b43cfceb44e48c0e0572825 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Thu, 27 Jan 2022 19:07:32 +0100 Subject: gen-DSA: diff and commit changes to extracvefile In case we're processing a dist that uses an ExtendFile. --- bin/gen-DSA | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/gen-DSA b/bin/gen-DSA index e86a3721db..a78530466b 100755 --- a/bin/gen-DSA +++ b/bin/gen-DSA @@ -414,9 +414,12 @@ EOF echo "$IDMODE text written to ./$IDMODE-$DAID" if [ "$IDMODE" = "DLA" ] || [ "$IDMODE" = "ELA" ]; then idmode=$(echo "$IDMODE" | tr A-Z a-z) + if [ -n "${DISTS}" ]; then + extracvefile=`jq -r ".distributions.${DISTS}.maincvefile" data/config.json` + fi if [ -d .git ]; then echo "Made the following changes:" - git diff -- data/$IDMODE/list data/CVE/list $needed_file + git diff -- data/$IDMODE/list data/CVE/list $extracvefile $needed_file if ! git diff-index --name-only HEAD -- $needed_file | grep -qs . && [ $TYPE = security ]; then warn "did not make any changes to $needed_file - this may indicate duplicate work or misspelled package name" fi @@ -426,7 +429,7 @@ EOF echo -n "Do you want to commit and push them now ? [Yn] " read reply if [ "$reply" = "Y" ] || [ "$reply" = "" ] || [ "$reply" = "y" ]; then - git add data/$IDMODE/list data/CVE/list $needed_file + git add data/$IDMODE/list data/CVE/list $extracvefile $needed_file git commit -m "Reserve $IDMODE-$DAID for $PACKAGE" git push origin master fi -- cgit v1.2.3