Ingo Molnar | 0780060 | 2009-04-20 15:00:56 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | echo "/* Automatically generated by $0 */ |
| 4 | struct cmdname_help |
| 5 | { |
| 6 | char name[16]; |
| 7 | char help[80]; |
| 8 | }; |
| 9 | |
| 10 | static struct cmdname_help common_cmds[] = {" |
| 11 | |
Ingo Molnar | 1d8c8b2 | 2009-04-20 15:52:29 +0200 | [diff] [blame] | 12 | sed -n -e 's/^perf-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt | |
Ingo Molnar | 0780060 | 2009-04-20 15:00:56 +0200 | [diff] [blame] | 13 | sort | |
| 14 | while read cmd |
| 15 | do |
| 16 | sed -n ' |
Ingo Molnar | 1d8c8b2 | 2009-04-20 15:52:29 +0200 | [diff] [blame] | 17 | /^NAME/,/perf-'"$cmd"'/H |
Ingo Molnar | 0780060 | 2009-04-20 15:00:56 +0200 | [diff] [blame] | 18 | ${ |
| 19 | x |
Ingo Molnar | 1d8c8b2 | 2009-04-20 15:52:29 +0200 | [diff] [blame] | 20 | s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/ |
Ingo Molnar | 0780060 | 2009-04-20 15:00:56 +0200 | [diff] [blame] | 21 | p |
Ingo Molnar | 1d8c8b2 | 2009-04-20 15:52:29 +0200 | [diff] [blame] | 22 | }' "Documentation/perf-$cmd.txt" |
Ingo Molnar | 0780060 | 2009-04-20 15:00:56 +0200 | [diff] [blame] | 23 | done |
| 24 | echo "};" |