summaryrefslogtreecommitdiff
path: root/utils/update-autoconf.sh
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-04-24 13:16:51 -0400
committerBen Gamari <ben@well-typed.com>2019-04-25 17:16:21 -0400
commitfaa94d47d8c15053b5bb4f173a7c830a06dc9515 (patch)
tree64deb0b62df27635cec52b4a26a7f00e7a5c2252 /utils/update-autoconf.sh
parent4e22826716dc0d3b4ab8bdd538c569a280cd8083 (diff)
downloadhaskell-faa94d47d8c15053b5bb4f173a7c830a06dc9515.tar.gz
update-autoconf: Initial commit
Diffstat (limited to 'utils/update-autoconf.sh')
-rwxr-xr-xutils/update-autoconf.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/utils/update-autoconf.sh b/utils/update-autoconf.sh
new file mode 100755
index 0000000000..85998a2c2a
--- /dev/null
+++ b/utils/update-autoconf.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+# Script to update autoconf scripts in the GHC tree. Should be run prior to
+# release.
+
+set -e
+
+tmp=`mktemp -d`
+git -C $tmp clone https://git.savannah.gnu.org/git/config.git
+commit=`git -C $tmp/config rev-parse HEAD`
+echo "Updating to $commit..."
+
+files=
+for i in $(git ls-files | grep config.guess); do
+ echo $i
+ cp $tmp/config/config.guess $i
+ files="$i $files"
+done
+
+for i in $(git ls-files | grep config.sub); do
+ echo $i
+ cp $tmp/config/config.sub $i
+ files="$i $files"
+done
+
+git commit $files -m "Update autoconf scripts" -m "Scripts taken from autoconf $commit"
+rm -Rf $tmp