jjb: Add missing function to binutils build script
authorKienan Stewart <kstewart@efficios.com>
Fri, 17 May 2024 15:24:45 +0000 (11:24 -0400)
committerKienan Stewart <kstewart@efficios.com>
Fri, 17 May 2024 15:26:16 +0000 (11:26 -0400)
Change-Id: Ifa110754469a25ffe61b3cf28efb8190d8e30eb6
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
scripts/binutils-gdb/build.sh

index e96422081d81eccc5dadad6de6fe1f3cdbc0150e..73224e748d67415d63776008da19c48e25fda2af 100755 (executable)
 
 set -exu
 
+print_header() {
+    set +x
+
+    local message=" $1 "
+    local message_len
+    local padding_len
+
+    message_len="${#message}"
+    padding_len=$(( (80 - (message_len)) / 2 ))
+
+    printf '\n'; printf -- '#%.0s' {1..80}; printf '\n'
+    printf -- '-%.0s' {1..80}; printf '\n'
+    printf -- '#%.0s' $(seq 1 $padding_len); printf '%s' "$message"; printf -- '#%.0s' $(seq 1 $padding_len); printf '\n'
+    printf -- '-%.0s' {1..80}; printf '\n'
+    printf -- '#%.0s' {1..80}; printf '\n\n'
+
+    set -x
+}
+
 failed_configure() {
     # Assume we are in the configured build directory
     echo "#################### BEGIN config.log ####################"
This page took 0.024098 seconds and 4 git commands to generate.