summaryrefslogtreecommitdiffstats
path: root/scripts/update-m4.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/update-m4.sh')
-rwxr-xr-xscripts/update-m4.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/update-m4.sh b/scripts/update-m4.sh
new file mode 100755
index 0000000..e0d500d
--- /dev/null
+++ b/scripts/update-m4.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# Script to update M4 files from Gnulib, GNU Autoconf Archive, and GNU Coreutils
+#
+# Copyright (C) 2023 P. J. McDermott
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved. This file is offered as-is,
+# without any warranty.
+
+set -eu
+
+SV_CGIT='https://git.savannah.gnu.org/cgit'
+
+for f in m4/gl_*.m4; do
+ wget -O "${f}" "${SV_CGIT}/gnulib.git/plain/m4/${f#m4/gl_}"
+done
+
+for f in m4/ax_*.m4; do
+ wget -O "${f}" "${SV_CGIT}/autoconf-archive.git/plain/${f}"
+done
+
+wget -O - "${SV_CGIT}/coreutils.git/plain/configure.ac" | sed -n '
+ /^# Copyright /,/^dnl Written /{
+ p;
+ s/^dnl Written .*$//p;
+ };
+ /^# gl_GCC_VERSION_IFELSE/,/^$/p;
+ ' | sed '$d' 1>'m4/gcc_version.m4'