annotate more/report-recorded-commands.sh @ 1178:80693b1a8038

Yank toybox from simple-root-filesystem. (Still need it for patch in host-tools.sh)
author Rob Landley <rob@landley.net>
date Mon, 26 Jul 2010 00:06:58 -0500
parents 300e6d919d86
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
355
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
2
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
3 # List the commands used to build each architecture.
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
4
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
5 # If given an argument it's the architecture to compare others against,
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
6 # which shows just the extra commands used by those other architectures.
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
7
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
8 # Mines the output created by build.sh after record-commands.sh.
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
9
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
10 COMPARE="$1"
355
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
11
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
12 # Output the list of commands used in a command log.
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
13
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
14 function mine_commands()
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
15 {
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
16 awk '{print $1}' build/logs/cmdlines.$1.* | sort -u
355
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
17 }
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
18
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
19 # Iterate through architectures
355
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
20
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
21 for i in `ls -1 build/logs/cmdlines.* | sed 's@.*/cmdlines\.\([^.]*\).*@\1@' | sort -u`
355
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
22 do
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
23 [ "$COMPARE" == "$i" ] && continue
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
24
355
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
25 # Start of new group, announce build stage we're looking at.
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
26 echo
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
27 echo -n Checking $i:
355
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
28
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
29 if [ -z "$COMPARE" ]
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
30 then
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
31 # Show all commands in first architecture.
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
32 echo $(mine_commands $i)
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
33 else
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
34 # Show commands that differ from first architecture (if any).
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
35 echo $(sort <(mine_commands $COMPARE) <(mine_commands $i) | uniq -u)
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.
Rob Landley <rob@landley.net>
parents: 859
diff changeset
36 fi
355
f6e1d29086c1 Mmove package-mini-native.sh back to using oneit, and always build toybox
Rob Landley <rob@landley.net>
parents:
diff changeset
37 done