tools/extract-config.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Aug 31 16:20:03 2007 +0000 (2007-08-31)
changeset 348 9fcb5046b4b5
child 375 4beb099d5aa4
permissions -rwxr-xr-x
Trying to guess how we were called does not work. Don't try to be smart, and take the full path, even if we are in PATH.
     1 #!/bin/sh
     2 
     3 # This scripts extracts a crosstool-NG configuration from the log file
     4 # of a toolchain build with crosstool-NG.
     5 
     6 # Usage: cat <logfile> |$0
     7 
     8 awk '
     9 BEGIN {
    10   dump = 0;
    11 }
    12 
    13 $0~/Dumping crosstool-NG configuration: done in.+s$/ {
    14   dump = 0;
    15 }
    16 
    17 dump == 1 { $1 = "" }
    18 dump == 1
    19 
    20 $0~/Dumping crosstool-NG configuration$/ {
    21   dump = 1;
    22 }
    23 ' |cut -d ' ' -f 2-