Mercurial > hg > aboriginal
view sources/toys/report_recorded_commands.sh @ 807:d0b74a631587 0.9.7
Teach ccwrap.c to use arch-specific WRAPPER_TOPDIR values, to avoid interfering with canadian cross.
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 14 Aug 2009 06:01:38 -0500 |
parents | f6e1d29086c1 |
children |
line wrap: on
line source
#!/bin/bash # Quick script to mine the output of "RECORD_COMMANDS=1 ./forkbomb.sh --nofork" # for lists of commands used in each stage. # Output the list of commands used in a command log. function mine_commands() { awk '{print $1}' $1 | sort -u } # Sort the log files into groups, then iterate through the result for i in `(for i in build/cmdlines-*/*; do echo $i; done) | sed 's@.*/cmdlines\.@@' | sort -u` do # Start of new group, announce build stage we're looking at. FIRST="" echo echo Checking $i # Loop through this build stage in each architecture. for j in build/cmdlines-*/cmdlines.$i do NAME="$(echo $j | sed 's@build/cmdlines-\([^/]*\)/.*@\1@')" if [ -z "$FIRST" ] then # Show all commands in first architecture. echo $NAME: $(mine_commands $j) FIRST=$j else # Show commands that differ from first architecture (if any). X=$(sort <(mine_commands $FIRST) <(mine_commands $j) | uniq -u) [ ! -z "$X" ] && echo $NAME: $X fi done done