Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] [gdb] Normalize shell script indentation
@ 2026-09-15 17:28 Tom de Vries
  2026-09-15 17:28 ` [PATCH 1/2] [gdb] Mark some shell scripts as having 2-space indentation Tom de Vries
  2026-09-15 17:28 ` [PATCH 2/2] [gdb] Fix 3-space indentation in shell scripts Tom de Vries
  0 siblings, 2 replies; 3+ messages in thread
From: Tom de Vries @ 2026-09-15 17:28 UTC (permalink / raw)
  To: gdb-patches

This patch consist of 2 patches.

The first marks some shell scripts as having a non-default indentation.

The second normalizes some shell scripts using 3-space indentation.

The intention is that after this series, it's clear what the required
indentation is in shell scripts.

Tom de Vries (2):
  [gdb] Mark some shell scripts as having 2-space indentation
  [gdb] Fix 3-space indentation in shell scripts

 gdb/config/djgpp/djcheck.sh    | 7 +++++++
 gdb/config/djgpp/djconfig.sh   | 7 +++++++
 gdb/contrib/expect-read1.sh    | 1 +
 gdb/features/feature_to_c.sh   | 1 +
 gdb/gdb_buildall.sh            | 7 +++++++
 gdb/syscalls/update-freebsd.sh | 6 +++---
 gdb/syscalls/update-netbsd.sh  | 6 +++---
 7 files changed, 29 insertions(+), 6 deletions(-)


base-commit: eec39a2f9250c622d86219cc182c4feaa6b07c50
-- 
2.51.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] [gdb] Mark some shell scripts as having 2-space indentation
  2026-09-15 17:28 [PATCH 0/2] [gdb] Normalize shell script indentation Tom de Vries
@ 2026-09-15 17:28 ` Tom de Vries
  2026-09-15 17:28 ` [PATCH 2/2] [gdb] Fix 3-space indentation in shell scripts Tom de Vries
  1 sibling, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2026-09-15 17:28 UTC (permalink / raw)
  To: gdb-patches

Some shell-scripts have 2-space indentation.

Make a note of this in the files, to make editors (emacs in particular)
respect this.

I copied the pattern I found in gdb/features/feature_to_c.sh, and added the
more modern sh-basic-offset.

Likewise, add sh-basic-offset in gdb/features/feature_to_c.sh and
gdb/contrib/expect-read1.sh.
---
 gdb/config/djgpp/djcheck.sh  | 7 +++++++
 gdb/config/djgpp/djconfig.sh | 7 +++++++
 gdb/contrib/expect-read1.sh  | 1 +
 gdb/features/feature_to_c.sh | 1 +
 gdb/gdb_buildall.sh          | 7 +++++++
 5 files changed, 23 insertions(+)

diff --git a/gdb/config/djgpp/djcheck.sh b/gdb/config/djgpp/djcheck.sh
index 35e6e765dc6..5b81ddcca55 100644
--- a/gdb/config/djgpp/djcheck.sh
+++ b/gdb/config/djgpp/djcheck.sh
@@ -45,3 +45,10 @@ do
     fi
   done
 done
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# sh-basic-offset:2
+# End:
+# vi:sw=2
diff --git a/gdb/config/djgpp/djconfig.sh b/gdb/config/djgpp/djconfig.sh
index e5ca023561f..990c71a1279 100644
--- a/gdb/config/djgpp/djconfig.sh
+++ b/gdb/config/djgpp/djconfig.sh
@@ -184,3 +184,10 @@ echo "Running the configure script..."
 if test -f "${srcdir}/install-" ; then
   mv "${srcdir}/install-" "${srcdir}/install-.sh"
 fi
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# sh-basic-offset:2
+# End:
+# vi:sw=2
diff --git a/gdb/contrib/expect-read1.sh b/gdb/contrib/expect-read1.sh
index 16b2dbb804d..cda71e40c11 100755
--- a/gdb/contrib/expect-read1.sh
+++ b/gdb/contrib/expect-read1.sh
@@ -53,5 +53,6 @@ LD_PRELOAD=$SO expect "$@"
 # Local Variables:
 # mode:shell-script
 # sh-indentation:2
+# sh-basic-offset:2
 # End:
 # vi:sw=2
diff --git a/gdb/features/feature_to_c.sh b/gdb/features/feature_to_c.sh
index ecbbd773011..4884d6894da 100755
--- a/gdb/features/feature_to_c.sh
+++ b/gdb/features/feature_to_c.sh
@@ -62,5 +62,6 @@ echo "};" >> "$output"
 # Local Variables:
 # mode:shell-script
 # sh-indentation:2
+# sh-basic-offset:2
 # End:
 # vi:sw=2
diff --git a/gdb/gdb_buildall.sh b/gdb/gdb_buildall.sh
index 0462889e52f..55b585b8246 100644
--- a/gdb/gdb_buildall.sh
+++ b/gdb/gdb_buildall.sh
@@ -272,3 +272,10 @@ then
 fi
 
 exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# sh-basic-offset:2
+# End:
+# vi:sw=2
-- 
2.51.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] [gdb] Fix 3-space indentation in shell scripts
  2026-09-15 17:28 [PATCH 0/2] [gdb] Normalize shell script indentation Tom de Vries
  2026-09-15 17:28 ` [PATCH 1/2] [gdb] Mark some shell scripts as having 2-space indentation Tom de Vries
@ 2026-09-15 17:28 ` Tom de Vries
  1 sibling, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2026-09-15 17:28 UTC (permalink / raw)
  To: gdb-patches

There are two shell scripts that have 3-space indentation.

Normalize this to 4-space indentation.
---
 gdb/syscalls/update-freebsd.sh | 6 +++---
 gdb/syscalls/update-netbsd.sh  | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gdb/syscalls/update-freebsd.sh b/gdb/syscalls/update-freebsd.sh
index b0713978473..417632845e3 100755
--- a/gdb/syscalls/update-freebsd.sh
+++ b/gdb/syscalls/update-freebsd.sh
@@ -28,9 +28,9 @@
 # rather than syscalls.master as syscall.h is easier to parse.
 
 if [ $# -ne 1 ]; then
-   echo "Error: Path to syscall.h missing. Aborting."
-   echo "Usage: update-freebsd.sh <path-to-syscall.h>"
-   exit 1
+    echo "Error: Path to syscall.h missing. Aborting."
+    echo "Usage: update-freebsd.sh <path-to-syscall.h>"
+    exit 1
 fi
 
 year=$(date +%Y)
diff --git a/gdb/syscalls/update-netbsd.sh b/gdb/syscalls/update-netbsd.sh
index 48defbfa13f..25678592453 100755
--- a/gdb/syscalls/update-netbsd.sh
+++ b/gdb/syscalls/update-netbsd.sh
@@ -28,9 +28,9 @@
 # rather than syscalls.master as syscall.h is easier to parse.
 
 if [ $# -ne 1 ]; then
-   echo "Error: Path to syscall.h missing. Aborting."
-   echo "Usage: update-netbsd.sh <path-to-syscall.h>"
-   exit 1
+    echo "Error: Path to syscall.h missing. Aborting."
+    echo "Usage: update-netbsd.sh <path-to-syscall.h>"
+    exit 1
 fi
 
 cat > netbsd.xml.tmp <<EOF
-- 
2.51.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-15 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15 17:28 [PATCH 0/2] [gdb] Normalize shell script indentation Tom de Vries
2026-09-15 17:28 ` [PATCH 1/2] [gdb] Mark some shell scripts as having 2-space indentation Tom de Vries
2026-09-15 17:28 ` [PATCH 2/2] [gdb] Fix 3-space indentation in shell scripts Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox