summaryrefslogtreecommitdiff
path: root/tools/extract-config.sh
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-07-17 21:44:33 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-07-17 21:44:33 (GMT)
commitd5db172ef497472211ba081b70b2c8aad8ccbd89 (patch)
tree7841e59e928b43995024aaac3e5f3d66bbc253cd /tools/extract-config.sh
parent3f4ac101f2b4392089e68b9307a7773a97d0ce6d (diff)
Revisit the extract-config way of working: ct-ng is the sole entry point to crosstool-NG, and ct-ng.extrac-config no longer exists. You now have to call "ct-ng extractconfig </path/to/your/build.log" instead.
Diffstat (limited to 'tools/extract-config.sh')
-rwxr-xr-xtools/extract-config.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/extract-config.sh b/tools/extract-config.sh
new file mode 100755
index 0000000..b5c77c6
--- /dev/null
+++ b/tools/extract-config.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# This scripts extracts a crosstool-NG configuration from the log file
+# of a toolchain build with crosstool-NG.
+
+# Usage: cat <logfile> |$0
+
+awk '
+BEGIN {
+ dump = 0;
+}
+
+$0~/Dumping crosstool-NG configuration: done in.+s$/ {
+ dump = 0;
+}
+
+dump == 1 { $1 = "" }
+dump == 1
+
+$0~/Dumping crosstool-NG configuration$/ {
+ dump = 1;
+}
+' |cut -d ' ' -f 2-