tools/extractConfig.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Jul 02 19:40:54 2007 +0000 (2007-07-02)
changeset 197 9383bf4a2e2e
parent 45 42faddd0098a
permissions -rwxr-xr-x
Get rid of eclipse fiels once and for all.
Homogenise the references to crosstool-NG:
- the project is named "crosstool-NG"
- the front-end is named "ct-ng"
- don't use shortcuts (such as "ct-ng" to stand for "crosstool-NG")
Default action is to print help.
Don't speak of make rules when dumping help, just speak of actions.
yann@45
     1
#!/bin/sh
yann@45
     2
yann@197
     3
# This scripts extracts a crosstool-NG configuration from the log file
yann@197
     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-