From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 5/7] [gdb/doc] Add gen-news.sh --check
Date: Mon, 2 Nov 2026 17:33:50 +0100 [thread overview]
Message-ID: <20261102163352.2416793-6-tdevries@suse.de> (raw)
In-Reply-To: <20261102163352.2416793-1-tdevries@suse.de>
Add gen-news.sh --check, that checks whether gdb/NEWS is up-to-date.
---
gdb/doc/gen-news.sh | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/gdb/doc/gen-news.sh b/gdb/doc/gen-news.sh
index 11c48dc661c..7b45a0103ef 100755
--- a/gdb/doc/gen-news.sh
+++ b/gdb/doc/gen-news.sh
@@ -2,6 +2,11 @@
set -e
+check=false
+if [ "$1" = "--check" ]; then
+ check=true
+fi
+
f=gdb/NEWS
gen_news ()
@@ -32,4 +37,20 @@ EOF
done
}
+cleanup ()
+{
+ if [ "$tmp" != "" ]; then
+ rm -f "$tmp"
+ fi
+}
+
+if $check; then
+ tmp=""
+ trap cleanup EXIT
+ tmp=$(mktemp)
+ gen_news > "$tmp"
+ diff "$tmp" "$f"
+ exit 0
+fi
+
gen_news > "$f"
--
2.51.0
next prev parent reply other threads:[~2026-11-02 16:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 16:33 [PATCH 0/7] [gdb/NEWS] Move NEWS items to gdb/doc/NEWS-* Tom de Vries
2026-11-02 16:33 ` [PATCH 1/7] [gdb/doc] Add NEWS-* files Tom de Vries
2026-11-02 16:33 ` [PATCH 2/7] [gdb/doc] Add gen-news.sh Tom de Vries
2026-11-02 16:33 ` [PATCH 3/7] [gdb/NEWS] Regenerate using gdb/doc/gen-news.sh Tom de Vries
2026-11-02 16:33 ` [PATCH 4/7] [gdb/NEWS] Add header text mentioning it's generated Tom de Vries
2026-11-02 16:33 ` Tom de Vries [this message]
2026-11-02 16:33 ` [PATCH 6/7] [gdb/testsuite] Add gdb.src/news.exp Tom de Vries
2026-11-02 16:33 ` [PATCH 7/7] [pre-commit] Add check-news Tom de Vries
2026-11-02 17:06 ` [PATCH 0/7] [gdb/NEWS] Move NEWS items to gdb/doc/NEWS-* Eli Zaretskii
2026-11-02 17:15 ` Tom de Vries
2026-11-02 17:27 ` Tom de Vries
2026-11-20 17:56 ` Andrew Burgess
2026-11-20 18:59 ` Tom de Vries
2026-11-20 13:47 ` [PING] " Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261102163352.2416793-6-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox