Mercurial > hg > aboriginal
diff sources/more/report-recorded-commands.sh @ 897:850da666acc6
Redo command recording: no longer RECORD_COMMMANDS config entry, now sources/more/record-commands.sh run to set up the wrapper (either before or after host-tools.sh). General cleanup and simplification of code this interacted with, plus clean up bit rot in the reporting.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 21 Nov 2009 04:27:58 -0600 |
parents | sources/more/report_recorded_commands.sh@59b256cb1328 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/more/report-recorded-commands.sh Sat Nov 21 04:27:58 2009 -0600 @@ -0,0 +1,37 @@ +#!/bin/bash + +# List the commands used to build each architecture. + +# If given an argument it's the architecture to compare others against, +# which shows just the extra commands used by those other architectures. + +# Mines the output created by build.sh after record-commands.sh. + +COMPARE="$1" + +# Output the list of commands used in a command log. + +function mine_commands() +{ + awk '{print $1}' build/logs/cmdlines.$1.* | sort -u +} + +# Iterate through architectures + +for i in `ls -1 build/logs/cmdlines.* | sed 's@.*/cmdlines\.\([^.]*\).*@\1@' | sort -u` +do + [ "$COMPARE" == "$i" ] && continue + + # Start of new group, announce build stage we're looking at. + echo + echo -n Checking $i: + + if [ -z "$COMPARE" ] + then + # Show all commands in first architecture. + echo $(mine_commands $i) + else + # Show commands that differ from first architecture (if any). + echo $(sort <(mine_commands $COMPARE) <(mine_commands $i) | uniq -u) + fi +done