summaryrefslogtreecommitdiff
path: root/tools/extract-config.sh
blob: 386465229fdc3cf6e043885dedad37d912f2961b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

# 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-