tools/extractConfig.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue May 01 16:49:15 2007 +0000 (2007-05-01)
changeset 56 07a6a48962b7
child 197 9383bf4a2e2e
permissions -rwxr-xr-x
Merge patches sent by Robert P. J. Day <rpjday@mindspring.com>.
Warning: the buildroot folks purposedly removed the skip-comment patch but didn't really said why. Keeping it for the sake of having it in svn just in case (removing it will be easier thant not having it at all).
yann@45
     1
#!/bin/sh
yann@45
     2
yann@45
     3
# This scripts extracts a crosstool-ng configuration from the log file
yann@45
     4
# of a toolchain build with crosstool-ng.
yann@45
     5
yann@45
     6
# Usage: $0 <logfile>
yann@45
     7
yann@45
     8
cat "$1" |awk '
yann@45
     9
BEGIN {
yann@45
    10
  dump = 0;
yann@45
    11
}
yann@45
    12
yann@45
    13
$0~/Dumping crosstool-NG configuration: done in.+s$/ {
yann@45
    14
  dump = 0;
yann@45
    15
}
yann@45
    16
yann@45
    17
dump == 1 { $1 = "" }
yann@45
    18
dump == 1
yann@45
    19
yann@45
    20
$0~/Dumping crosstool-NG configuration$/ {
yann@45
    21
  dump = 1;
yann@45
    22
}
yann@45
    23
' |cut -d ' ' -f 2-