~ubuntu-branches/ubuntu/lucid/linux-rt/lucid

« back to all changes in this revision

Viewing changes to tools/perf/util/generate-cmdlist.sh

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2009-08-05 23:00:52 UTC
  • Revision ID: james.westby@ubuntu.com-20090805230052-7xedvqcyk9dnnxb2
Tags: 2.6.31-1.1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
12
sed -n -e 's/^perf-\([^         ]*\)[   ].* common.*/\1/p' command-list.txt |
 
13
sort |
 
14
while read cmd
 
15
do
 
16
     sed -n '
 
17
     /^NAME/,/perf-'"$cmd"'/H
 
18
     ${
 
19
            x
 
20
            s/.*perf-'"$cmd"' - \(.*\)/  {"'"$cmd"'", "\1"},/
 
21
            p
 
22
     }' "Documentation/perf-$cmd.txt"
 
23
done
 
24
echo "};"